diff --git a/index.php b/index.php
index c9e15c41..db73db38 100644
--- a/index.php
+++ b/index.php
@@ -53,7 +53,7 @@ foreach (ServConfig::getServerList() as $setting) {
삼국지 모의전투 HiDCHe
= WebUtil::printJS('d_shared/common_path.js') ?>
= WebUtil::printCSS('d_shared/common.css') ?>
diff --git a/src/kakao/Kakao_REST_API_Helper.php b/src/kakao/Kakao_REST_API_Helper.php
index 36a3ffb8..29ce3da8 100644
--- a/src/kakao/Kakao_REST_API_Helper.php
+++ b/src/kakao/Kakao_REST_API_Helper.php
@@ -85,7 +85,10 @@ class Kakao_REST_API_Helper
}
if($changeRedirectDomain && key_exists('HTTP_HOST', $_SERVER)){
- $uriObj = Uri::createFromBaseUri(KakaoKey::REDIRECT_URI, $_SERVER['HTTP_HOST']);
+ $uriObj = Uri::createFromBaseUri(
+ KakaoKey::REDIRECT_URI,
+ Uri::createFromServer($_SERVER)
+ );
$this->REDIRECT_URI = (string)$uriObj;
}
else{
diff --git a/src/sammo/WebUtil.php b/src/sammo/WebUtil.php
index 1b599df2..63369af8 100644
--- a/src/sammo/WebUtil.php
+++ b/src/sammo/WebUtil.php
@@ -337,8 +337,11 @@ class WebUtil
return join("\n", $result);
}
- public static function replaceDomain(string $origPath, string $newDomain): string{
- $upath = Uri::createFromBaseUri($origPath, $newDomain);
+ public static function replaceDomain(string $origPath): string{
+ $upath = Uri::createFromBaseUri(
+ $origPath,
+ Uri::createFromServer($_SERVER)
+ );
return (string)$upath;
}
}