location / {
if ( $request_method = 'OPTIONS' ) {
add_header access-control-allow-headers range;
add_header access-control-allow-methods GET,POST,HEAD,OPTIONS;
add_header access-control-allow-origin *;
return 200;
}
add_header access-control-allow-origin *;
}
第二种方法
location / {
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS';
add_header Access-Control-Allow-Headers 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization';
if ($request_method = 'OPTIONS') {
return 204;
}
}
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END














cqlbgzs@163.com 7个月前0
d好879445037@qq.com 1年前0
购买了 无法下载Alexcc 2年前0
强大Alexcc 2年前0
看不了教程Alexcc 2年前0
雷刺下载Alexcc 2年前0
下载Alexcc 2年前0
下载dsa456159 2年前0
下载