-
-
Save xydinesh/fa05ed6352f90d2c8817 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 / { | |
more_set_headers 'Access-Control-Allow-Origin: $http_origin' 'Access-Control-Allow-Credentials: true'; | |
if ($request_method = 'OPTIONS') { | |
add_header 'Access-Control-Max-Age' 1728000; | |
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, DELETE, PUT'; | |
add_header 'Access-Control-Allow-Headers' 'Authorization,Content-Type,Accept,Origin,User-Agent,DNT,Cache-Control,X-Mx-ReqToken,Keep-Alive,X-Requested-With,If-Modified-Since'; | |
add_header 'Content-Length' 0; | |
add_header 'Content-Type' 'text/plain charset=UTF-8'; | |
return 204; | |
} | |
uwsgi_pass flask; | |
include /etc/nginx/uwsgi_params; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment