浏览代码

nginx.conf

master
当前提交
a7f5ca6cf3
共有 1 个文件被更改,包括 29 次插入0 次删除
  1. +29
    -0
      nginx.conf

+ 29
- 0
nginx.conf 查看文件

@@ -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;
}
}
}
}

正在加载...
取消
保存