localdev nginx.conf fix
This commit is contained in:
parent
82c501f1b5
commit
742042398c
18
nginx.conf
18
nginx.conf
|
@ -14,7 +14,7 @@ events {
|
||||||
}
|
}
|
||||||
|
|
||||||
http {
|
http {
|
||||||
include mime.types;
|
include /usr/local/etc/nginx/mime.types;
|
||||||
default_type application/octet-stream;
|
default_type application/octet-stream;
|
||||||
|
|
||||||
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||||
|
@ -35,11 +35,11 @@ http {
|
||||||
~^https?://(.*\.)?localhost:3000|new.discours.io|discours.io()(:\d+)?$ $http_origin;
|
~^https?://(.*\.)?localhost:3000|new.discours.io|discours.io()(:\d+)?$ $http_origin;
|
||||||
default "";
|
default "";
|
||||||
}
|
}
|
||||||
|
|
||||||
upstream discoursio-api-8080 {
|
upstream localhost-8080 {
|
||||||
server 0.0.0.0:8080;
|
server 0.0.0.0:8080;
|
||||||
}
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen localhost:8000;
|
listen localhost:8000;
|
||||||
#server_name localhost;
|
#server_name localhost;
|
||||||
|
@ -59,8 +59,8 @@ http {
|
||||||
gzip_vary on;
|
gzip_vary on;
|
||||||
gzip_comp_level 6;
|
gzip_comp_level 6;
|
||||||
|
|
||||||
proxy_pass http://discoursio-api-8080;
|
proxy_pass http://localhost-8080;
|
||||||
http2_push_preload on;
|
http2_push_preload on;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_read_timeout 60s;
|
proxy_read_timeout 60s;
|
||||||
proxy_buffer_size 4096;
|
proxy_buffer_size 4096;
|
||||||
|
@ -74,7 +74,7 @@ http {
|
||||||
proxy_set_header X-Forwarded-Port $server_port;
|
proxy_set_header X-Forwarded-Port $server_port;
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
proxy_set_header X-Request-Start $msec;
|
proxy_set_header X-Request-Start $msec;
|
||||||
|
|
||||||
|
|
||||||
if ($request_method = 'OPTIONS') {
|
if ($request_method = 'OPTIONS') {
|
||||||
add_header 'Access-Control-Allow-Origin' '*' always;
|
add_header 'Access-Control-Allow-Origin' '*' always;
|
||||||
|
@ -176,5 +176,5 @@ http {
|
||||||
# index index.html index.htm;
|
# index index.html index.htm;
|
||||||
# }
|
# }
|
||||||
#}
|
#}
|
||||||
include servers/*;
|
# include /usr/local/etc/nginx/servers/*;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user