localdev nginx.conf fix
This commit is contained in:
18
nginx.conf
18
nginx.conf
@@ -14,7 +14,7 @@ events {
|
||||
}
|
||||
|
||||
http {
|
||||
include mime.types;
|
||||
include /usr/local/etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
#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;
|
||||
default "";
|
||||
}
|
||||
|
||||
upstream discoursio-api-8080 {
|
||||
|
||||
upstream localhost-8080 {
|
||||
server 0.0.0.0:8080;
|
||||
}
|
||||
|
||||
|
||||
server {
|
||||
listen localhost:8000;
|
||||
#server_name localhost;
|
||||
@@ -59,8 +59,8 @@ http {
|
||||
gzip_vary on;
|
||||
gzip_comp_level 6;
|
||||
|
||||
proxy_pass http://discoursio-api-8080;
|
||||
http2_push_preload on;
|
||||
proxy_pass http://localhost-8080;
|
||||
http2_push_preload on;
|
||||
proxy_http_version 1.1;
|
||||
proxy_read_timeout 60s;
|
||||
proxy_buffer_size 4096;
|
||||
@@ -74,7 +74,7 @@ http {
|
||||
proxy_set_header X-Forwarded-Port $server_port;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Request-Start $msec;
|
||||
|
||||
|
||||
|
||||
if ($request_method = 'OPTIONS') {
|
||||
add_header 'Access-Control-Allow-Origin' '*' always;
|
||||
@@ -176,5 +176,5 @@ http {
|
||||
# index index.html index.htm;
|
||||
# }
|
||||
#}
|
||||
include servers/*;
|
||||
}
|
||||
# include /usr/local/etc/nginx/servers/*;
|
||||
}
|
||||
|
Reference in New Issue
Block a user