Advertisement
Guest User

Untitled

a guest
Nov 25th, 2014
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. OPTIONS https://api.example.com/endpoint net::ERR_CONNECTION_TIMED_OUT
  2.  
  3. OPTIONS https://api.example.com/endpoint [250ms]
  4. null
  5.  
  6. location /{
  7. proxy_pass http://127.0.0.1:5000;
  8.  
  9. add_header 'Access-Control-Allow-Header' 'Origin, Content-Type, Accept, Authorization';
  10. add_header 'Access-Control-Allow-Methods' 'POST, GET, OPTIONS';
  11. add_header 'Access-Control-Allow-Origin' 'http://example.com';
  12. if ($request_method = 'OPTIONS') {
  13. add_header 'Access-Control-Allow-Origin' 'http://www.webapp.com';
  14. add_header 'Access-Control-Allow-Methods' 'POST, GET, OPTIONS';
  15. add_header 'Access-Control-Max-Age' '1728000';
  16. add_header 'Content-Type' 'text/plain; charset=UTF-8';
  17. return 200;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement