@@ -350,7 +350,7 @@ CosResult BaseOp::UploadAction(
350
350
351
351
// 1. host优先级,私有ip > 自定义域名 > DNS cache > 默认域名
352
352
std::string BaseOp::GetRealUrl (const std::string& host, const std::string& path,
353
- bool is_https) {
353
+ bool is_https, bool is_generate_presigned_url ) {
354
354
std::string dest_uri;
355
355
std::string dest_host = host;
356
356
std::string dest_path = path;
@@ -366,17 +366,17 @@ std::string BaseOp::GetRealUrl(const std::string& host, const std::string& path,
366
366
if (m_config &&
367
367
m_config->GetSetIntranetOnce () &&
368
368
m_config->IsUseIntranet () &&
369
- !m_config->GetIntranetAddr ().empty ()) {
369
+ !m_config->GetIntranetAddr ().empty () && !is_generate_presigned_url ) {
370
370
dest_host = m_config->GetIntranetAddr ();
371
371
} else if (CosSysConfig::IsUseIntranet () &&
372
- !CosSysConfig::GetIntranetAddr ().empty ()) {
372
+ !CosSysConfig::GetIntranetAddr ().empty () && !is_generate_presigned_url ) {
373
373
dest_host = CosSysConfig::GetIntranetAddr ();
374
374
} else if (m_config &&
375
375
(!m_config->GetDestDomain ().empty ())) {
376
376
dest_host = m_config->GetDestDomain ();
377
377
} else if (!CosSysConfig::GetDestDomain ().empty ()) {
378
378
dest_host = CosSysConfig::GetDestDomain ();
379
- } else if (CosSysConfig::GetUseDnsCache ()) {
379
+ } else if (CosSysConfig::GetUseDnsCache () && !is_generate_presigned_url ) {
380
380
dest_host = GetGlobalDnsCacheInstance ().Resolve (host);
381
381
}
382
382
0 commit comments