From 48a679bb9828742774d6012b67815b3e80e48c65 Mon Sep 17 00:00:00 2001 From: Cameron Date: Fri, 28 Apr 2017 12:06:27 -0700 Subject: [PATCH] Static domain header added and example added to e107.htaccess --- class2.php | 8 +++++++- e107.htaccess | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/class2.php b/class2.php index 268ddc229..03fa2018f 100644 --- a/class2.php +++ b/class2.php @@ -2671,7 +2671,13 @@ class e_http_header { $this->setHeader("X-Powered-By: e107", true); // no less secure than e107-specific html. } - + + if(defined('e_HTTP_STATIC')) + { + // $this->setHeader("Access-Control-Allow-Origin: *",true); + $this->setHeader("Access-Control-Allow-Origin: ".rtrim(e_HTTP_STATIC,'/'), true); + } + if($this->compression_server_support == true) { $this->setHeader('Vary: Accept-Encoding'); diff --git a/e107.htaccess b/e107.htaccess index 8e45d5a32..c3bfc3609 100644 --- a/e107.htaccess +++ b/e107.htaccess @@ -103,10 +103,11 @@ AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css text/javascript application/x-javascript application/javascript application/xml text/xml application/rss+xml - + Header set Cache-Control "public" Header unset Cookie Header unset Set-Cookie + # Header set Access-Control-Allow-Origin "http://static.mydomain.com"