nginx.conf
This commit is contained in:
29
nginx.conf
Normal file
29
nginx.conf
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user