blob: 1e1abd3e1ae22588a8540ec84e387842b3086d61 (
plain) (
tree)
|
|
#pragma once
#include <yql/essentials/core/url_preprocessing/interface/url_preprocessing.h>
#include <yql/essentials/core/url_preprocessing/pattern_group.h>
#include <yql/essentials/core/url_preprocessing/url_mapper.h>
#include <yql/essentials/core/yql_user_data.h>
#include <util/generic/string.h>
#include <util/generic/ptr.h>
#include <vector>
#include <utility>
namespace NYql {
class TGatewaysConfig;
class TUrlPreprocessing: public IUrlPreprocessing {
public:
using TPtr = TIntrusivePtr<TUrlPreprocessing>;
TUrlPreprocessing(const TGatewaysConfig& cfg) {
Configure(false, cfg);
}
TUrlPreprocessing() = default;
~TUrlPreprocessing() = default;
void Configure(bool restrictedUser, const TGatewaysConfig& cfg);
std::pair<TString, TString> Preprocess(const TString& url);
private:
bool RestrictedUser_ = false;
TUrlMapper Mapper_;
TPatternGroup AllowedUrls_;
};
}
|