Nginx get&post 静态文件返回200
常规写法 只能get请求返回200
location =/auth/callback {
root /data/nginx/static/test;
try_files "" /callback.txt;
}
get&post请求都返回200
location =/auth/callback {
default_type application/json;
alias /data/nginx/static/test/callback.txt;
error_page 405 =200 http://$host$request_uri;
}
参考:https://www.cnblogs.com/suntray/p/9792680.html