@@ -323,7 +323,7 @@ CosResult BaseOp::UploadAction(
323
323
324
324
// 1. host优先级,私有ip > 自定义域名 > DNS cache > 默认域名
325
325
std::string BaseOp::GetRealUrl (const std::string& host, const std::string& path,
326
- bool is_https) {
326
+ bool is_https, bool is_generate_presigned_url ) {
327
327
std::string dest_uri;
328
328
std::string dest_host = host;
329
329
std::string dest_path = path;
@@ -339,17 +339,17 @@ std::string BaseOp::GetRealUrl(const std::string& host, const std::string& path,
339
339
if (m_config &&
340
340
m_config->GetSetIntranetOnce () &&
341
341
m_config->IsUseIntranet () &&
342
- !m_config->GetIntranetAddr ().empty ()) {
342
+ !m_config->GetIntranetAddr ().empty () && !is_generate_presigned_url ) {
343
343
dest_host = m_config->GetIntranetAddr ();
344
344
} else if (CosSysConfig::IsUseIntranet () &&
345
- !CosSysConfig::GetIntranetAddr ().empty ()) {
345
+ !CosSysConfig::GetIntranetAddr ().empty () && !is_generate_presigned_url ) {
346
346
dest_host = CosSysConfig::GetIntranetAddr ();
347
347
} else if (m_config &&
348
348
(!m_config->GetDestDomain ().empty ())) {
349
349
dest_host = m_config->GetDestDomain ();
350
350
} else if (!CosSysConfig::GetDestDomain ().empty ()) {
351
351
dest_host = CosSysConfig::GetDestDomain ();
352
- } else if (CosSysConfig::GetUseDnsCache ()) {
352
+ } else if (CosSysConfig::GetUseDnsCache () && !is_generate_presigned_url ) {
353
353
dest_host = GetGlobalDnsCacheInstance ().Resolve (host);
354
354
}
355
355
0 commit comments