mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 10:02:01 +00:00
AWS SDK integration added url checking.
This commit is contained in:
parent
1289966a70
commit
94e9638006
@ -60,10 +60,12 @@ namespace S3
|
||||
}
|
||||
|
||||
|
||||
URI::URI(Poco::URI & uri)
|
||||
URI::URI(Poco::URI & uri_)
|
||||
{
|
||||
static const std::regex BUCKET_KEY_PATTERN("([^/]+)/(.*)");
|
||||
|
||||
uri = uri_;
|
||||
|
||||
// s3://*
|
||||
if (uri.getScheme() == "s3" || uri.getScheme() == "S3")
|
||||
{
|
||||
|
@ -43,12 +43,13 @@ private:
|
||||
*/
|
||||
struct URI
|
||||
{
|
||||
Poco::URI uri;
|
||||
// Custom endpoint if URI scheme is not S3.
|
||||
String endpoint;
|
||||
String bucket;
|
||||
String key;
|
||||
|
||||
explicit URI (Poco::URI & uri);
|
||||
explicit URI (Poco::URI & uri_);
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -154,7 +154,7 @@ StorageS3::StorageS3(const S3::URI & uri_,
|
||||
, compression_method(compression_method_)
|
||||
, client(S3::ClientFactory::instance().create(uri_.endpoint, access_key_id_, secret_access_key_))
|
||||
{
|
||||
context_global.getRemoteHostFilter().checkURL(uri_.endpoint);
|
||||
context_global.getRemoteHostFilter().checkURL(uri_.uri);
|
||||
setColumns(columns_);
|
||||
setConstraints(constraints_);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user