Skip to content
This repository was archived by the owner on Oct 27, 2018. It is now read-only.

Commit 81133cd

Browse files
committed
add users path to nginx config
1 parent 33b0991 commit 81133cd

File tree

1 file changed

+47
-1
lines changed

1 file changed

+47
-1
lines changed

nginx.conf

+47-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ http {
1717
keepalive 64;
1818
}
1919

20+
upstream users {
21+
server users:4400;
22+
keepalive 64;
23+
}
24+
2025
proxy_cache_path /etc/nginx/cache levels=1:2 keys_zone=STATIC:10m inactive=24h max_size=1g;
2126

2227
limit_conn_zone $binary_remote_addr zone=limit_per_ip:10m;
@@ -94,6 +99,41 @@ http {
9499
proxy_redirect off;
95100
}
96101

102+
location @app_users {
103+
proxy_pass https://users;
104+
# proxy_set_header Host $host;
105+
106+
proxy_cache off;
107+
# proxy_cache_valid 200 1d;
108+
# proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504;
109+
# proxy_cache_lock on;
110+
# proxy_cache_revalidate on;
111+
# proxy_cache_min_uses 3;
112+
113+
# add_header X-Cache-Status $upstream_cache_status;
114+
115+
add_header Access-Control-Allow-Origin *;
116+
add_header X-Frame-Options DENY;
117+
# add_header X-Content-Type-Options nosniff;
118+
# add_header X-XSS-Protection "1; mode=block";
119+
add_header Content-Security-Policy "default-src 'none'; connect-src 'self'; script-src 'self' 'unsafe-inline' https://www.google-analytics.com https://js-agent.newrelic.com https://bam.nr-data.net; style-src 'self' https://cdnjs.cloudflare.com https://fonts.googleapis.com 'unsafe-inline' 'unsafe-eval'; img-src 'self' *.githubusercontent.com https://github.com https://www.google-analytics.com data:; font-src 'self' https://fonts.gstatic.com https://fonts.googleapis.com 'unsafe-inline' 'unsafe-eval' data:";
120+
121+
proxy_set_header Host $http_host;
122+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
123+
proxy_set_header X-Real-IP $remote_addr;
124+
proxy_set_header X-Client-Verify SUCCESS;
125+
proxy_set_header X-Client-DN $ssl_client_s_dn;
126+
proxy_set_header X-SSL-Subject $ssl_client_s_dn;
127+
proxy_set_header X-SSL-Issuer $ssl_client_i_dn;
128+
proxy_set_header X-Forwarded-Proto $scheme;
129+
proxy_read_timeout 1800;
130+
proxy_connect_timeout 1800;
131+
proxy_http_version 1.1;
132+
proxy_set_header Connection "";
133+
proxy_buffering off;
134+
proxy_redirect off;
135+
}
136+
97137
location ~ /\. {
98138
deny all;
99139
}
@@ -112,13 +152,19 @@ http {
112152
root /usr/src/app/dist-web/public;
113153
try_files $uri$args $uri$args/ /index.html;
114154
index index.html;
115-
}
155+
}
116156

117157
location /api/ {
118158
gzip_static on;
119159

120160
try_files $uri @app;
121161
}
162+
163+
location /users/ {
164+
gzip_static on;
165+
166+
try_files $uri @app_users;
167+
}
122168
}
123169

124170
access_log off;

0 commit comments

Comments
 (0)