25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
785B

  1. worker_processes 1;
  2. events {
  3. worker_connections 1024;
  4. }
  5. http {
  6. include mime.types;
  7. default_type application/octet-stream;
  8. sendfile on;
  9. keepalive_timeout 65;
  10. server {
  11. listen 8888;
  12. server_name localhost;
  13. location / {
  14. add_header 'Access-Control-Allow-Origin' '*' always;
  15. proxy_pass http://127.0.0.1:3000;
  16. # Preflight.
  17. if ($request_method = OPTIONS) {
  18. add_header "Access-Control-Allow-Origin" *;
  19. add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS, HEAD, DELETE";
  20. add_header "Access-Control-Allow-Headers" "Authorization, Origin, X-Requested-With, Content-Type, Accept";
  21. return 200;
  22. }
  23. }
  24. }
  25. }