You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by wa...@apache.org on 2021/09/19 06:45:58 UTC

[echarts-website] branch asf-site updated: fix scheme in CORS header

This is an automated email from the ASF dual-hosted git repository.

wangzx pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/echarts-website.git


The following commit(s) were added to refs/heads/asf-site by this push:
     new d1aa7e4  fix scheme in CORS header
d1aa7e4 is described below

commit d1aa7e4e540d1d624bc39dfeb06456827b105265
Author: Zhongxiang.Wang <yh...@all-my-life.cn>
AuthorDate: Sun Sep 19 14:45:54 2021 +0800

    fix scheme in CORS header
---
 .htaccess | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/.htaccess b/.htaccess
index f0a280d..1646752 100644
--- a/.htaccess
+++ b/.htaccess
@@ -8,7 +8,8 @@ RedirectMatch 404 /\.github
 RedirectMatch 404 /\.asf\.yaml
 
 <IfModule mod_headers.c>
-	Header set Access-Control-Allow-Origin "%{HTTP_SCHEME}e://echarts.apache.org"
+	Header set Access-Control-Allow-Origin: http://echarts.apache.org
+	Header set Access-Control-Allow-Origin: https://echarts.apache.org env=HTTPS
 	Header set Access-Control-Allow-Methods "*"
 	Header set Access-Control-Allow-Headers "*"
 </IfModule>
@@ -36,19 +37,13 @@ RedirectMatch 404 /\.asf\.yaml
 	<IfModule mod_headers.c>
 		Header always set Cache-Control "no-store, no-cache, must-revalidate"
 		Header always set Expires "Thu, 01 Dec 1994 16:00:00 GMT"
-		Header always append Vary "Accept-Language"
+		Header always merge Vary "Accept-Language"
 	</IfModule>
 </If>
 
 <IfModule mod_rewrite.c>
 	RewriteEngine On
 
-	RewriteCond %{HTTPS} =on
-	RewriteRule ^(.*)$ - [env=HTTP_SCHEME:https]
-
-	RewriteCond %{HTTPS} !=on
-	RewriteRule ^(.*)$ - [env=HTTP_SCHEME:http]
-
 	RewriteCond "%{HTTP:Accept-Language}" ^zh [NC]
 	RewriteRule ^/?(index[.]html)?$ "/zh/index.html" [L,R=302]
 

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org