From 9850dc390d8494a1700f023b659eee9bb52c28eb Mon Sep 17 00:00:00 2001 From: thisgun Date: Thu, 10 Aug 2017 11:29:01 +0900 Subject: [PATCH] =?UTF-8?q?=EB=84=A4=EC=9D=B4=EB=B2=84=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=20=EC=B0=9C=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20url=20=EC=A3=BC?= =?UTF-8?q?=EC=86=8C=EB=A5=BC=20http=20=EB=A1=9C=20=EB=B3=B4=EB=82=B4?= =?UTF-8?q?=EA=B2=8C=EA=B8=88=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/naverpay.lib.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/naverpay.lib.php b/lib/naverpay.lib.php index 007cc6d4a..82f87f35e 100644 --- a/lib/naverpay.lib.php +++ b/lib/naverpay.lib.php @@ -208,6 +208,18 @@ function get_naverpay_item_image_url($it_id) continue; $url = str_replace(G5_PATH, G5_URL, $file); + + if( isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on' || $_SERVER['HTTPS'] == 1) ){ + $url = preg_replace('#^https:#', '', $url); + + $port_str = ':'.$_SERVER['SERVER_PORT']; + + if( strpos($url, $port_str) !== false ){ + $url = str_replace($port_str, '', $url); + } + } + + //TLS(SSL/HTTPS) 프로토콜 사용 시 네이버페이/네이버 쇼핑 서버가 해당 경로로 접근하여 데이터를 취득할 수 없으므로, 반드시 http 를 사용해야 함 $url = (preg_match('#^http:#', $url) ? '' : 'http:').$url; break;