Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- OPTIONS https://api.example.com/endpoint net::ERR_CONNECTION_TIMED_OUT
- OPTIONS https://api.example.com/endpoint [250ms]
- null
- location /{
- proxy_pass http://127.0.0.1:5000;
- add_header 'Access-Control-Allow-Header' 'Origin, Content-Type, Accept, Authorization';
- add_header 'Access-Control-Allow-Methods' 'POST, GET, OPTIONS';
- add_header 'Access-Control-Allow-Origin' 'http://example.com';
- if ($request_method = 'OPTIONS') {
- add_header 'Access-Control-Allow-Origin' 'http://www.webapp.com';
- add_header 'Access-Control-Allow-Methods' 'POST, GET, OPTIONS';
- add_header 'Access-Control-Max-Age' '1728000';
- add_header 'Content-Type' 'text/plain; charset=UTF-8';
- return 200;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement