Created
August 1, 2017 01:08
-
-
Save phodal/76eff91df344e7e3f4d1896331364465 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location /api { | |
proxy_pass http://localhost:12306.cn | |
add_header 'Access-Control-Allow-Origin' '*' always; | |
if ($request_method = 'OPTIONS') { | |
add_header 'Access-Control-Allow-Origin' '*' always; | |
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, PATCH, OPTIONS, HEAD'; | |
add_header 'Access-Control-Allow-Headers' 'Authorization, X-Requested-With, Content-Type'; | |
return 204; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment