基于Origin标头的CORS和OPTIONS方法以及Access-Control-Request-Method存在 从Origin标头设置一个env变量,然后使用它发送200个响应的响应标头 当前浏览器将请求标头设置为null,使用下面的代码后看不到所有响应标头,请问哪里出了错?
===============================
RewriteCond %{HTTP:Origin} "^http(s)?://(.+\.)?(abc\.com)$" [OR]
RewriteCond %{HTTP:Origin} "^null$"
RewriteCond %{REQUEST_METHOD} OPTIONS
RewriteCond %{HTTP:Access-Control-Request-Method} ^.+$
RewriteRule ^(.*)$ $1 [R=200,L,E=origin_is:%{HTTP:Origin}]
Header always set Access-Control-Allow-Origin %{origin_is}e env=origin_is
Header always set Access-Control-Allow-Methods %{Access-Control-Request-Method}e env=origin_is
Header always set Access-Control-Max-Age "1000" env=origin_is
Header always set Access-Control-Allow-Headers %{Access-Control-Request-Headers}e env=origin_is
Header merge Vary "Origin" env=origin_is
===============================