直接在伪静态粘贴就行
location ~* (runtime|application)/{
return 403;
}
# 跨域请求设置
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS';
add_header Access-Control-Allow-Headers 'Authorization, Content-Type';
location / {
if ($request_method = OPTIONS) {
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS';
add_header Access-Control-Allow-Headers 'Authorization, Content-Type';
add_header Content-Length 0;
add_header Content-Type text/plain;
return 204;
}
if (!-e $request_filename){
rewrite ^(.*)$ /index.php?s=$1 last; break;
}
}