From a7f5ca6cf37a6df0675bc9a29389d8607b127d60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Fri, 13 Nov 2020 15:22:59 +0300 Subject: [PATCH] nginx.conf --- nginx.conf | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 nginx.conf diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..ff14a62 --- /dev/null +++ b/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; + } + } + } +}