Browse Source

nginx.conf

master
commit
a7f5ca6cf3
1 changed files with 29 additions and 0 deletions
  1. +29
    -0
      nginx.conf

+ 29
- 0
nginx.conf View File

@@ -0,0 +1,29 @@

worker_processes 1;

events {
worker_connections 1024;
}

http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 8888;
server_name localhost;
location / {
add_header 'Access-Control-Allow-Origin' '*' always;
proxy_pass http://127.0.0.1:3000;

# Preflight.
if ($request_method = OPTIONS) {
add_header "Access-Control-Allow-Origin" *;
add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS, HEAD, DELETE";
add_header "Access-Control-Allow-Headers" "Authorization, Origin, X-Requested-With, Content-Type, Accept";
return 200;
}
}
}
}

Loading…
Cancel
Save