From 4839bd33ffa6106238d9c7d20c694738b5bad699 Mon Sep 17 00:00:00 2001 From: vnmedeiros Date: Mon, 16 Oct 2023 17:22:17 -0300 Subject: [PATCH] fix: change `$_SERVER['SERVER_NAME']` to `$_SERVER['HTTP_HOST']` --- src/classes/class-tainacan-private-files.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/classes/class-tainacan-private-files.php b/src/classes/class-tainacan-private-files.php index d7aab700c..8e5609b69 100644 --- a/src/classes/class-tainacan-private-files.php +++ b/src/classes/class-tainacan-private-files.php @@ -191,7 +191,7 @@ class Private_Files { $upload_dir = wp_get_upload_dir(); $base_upload_url = preg_replace('/^https?:\/\//', '', $upload_dir['baseurl']); - $requested_uri = ($_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']); + $requested_uri = ($_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); if ( strpos($requested_uri, $base_upload_url) === false ) { // Not uploads