@@ -350,7 +350,7 @@ CosResult BaseOp::UploadAction(
350350
351351// 1. host优先级,私有ip > 自定义域名 > DNS cache > 默认域名
352352std::string BaseOp::GetRealUrl (const std::string& host, const std::string& path,
353- bool is_https) {
353+ bool is_https, bool is_generate_presigned_url ) {
354354 std::string dest_uri;
355355 std::string dest_host = host;
356356 std::string dest_path = path;
@@ -366,17 +366,17 @@ std::string BaseOp::GetRealUrl(const std::string& host, const std::string& path,
366366 if (m_config &&
367367 m_config->GetSetIntranetOnce () &&
368368 m_config->IsUseIntranet () &&
369- !m_config->GetIntranetAddr ().empty ()) {
369+ !m_config->GetIntranetAddr ().empty () && !is_generate_presigned_url ) {
370370 dest_host = m_config->GetIntranetAddr ();
371371 } else if (CosSysConfig::IsUseIntranet () &&
372- !CosSysConfig::GetIntranetAddr ().empty ()) {
372+ !CosSysConfig::GetIntranetAddr ().empty () && !is_generate_presigned_url ) {
373373 dest_host = CosSysConfig::GetIntranetAddr ();
374374 } else if (m_config &&
375375 (!m_config->GetDestDomain ().empty ())) {
376376 dest_host = m_config->GetDestDomain ();
377377 } else if (!CosSysConfig::GetDestDomain ().empty ()) {
378378 dest_host = CosSysConfig::GetDestDomain ();
379- } else if (CosSysConfig::GetUseDnsCache ()) {
379+ } else if (CosSysConfig::GetUseDnsCache () && !is_generate_presigned_url ) {
380380 dest_host = GetGlobalDnsCacheInstance ().Resolve (host);
381381 }
382382
0 commit comments