@@ -17,6 +17,11 @@ http {
17
17
keepalive 64;
18
18
}
19
19
20
+ upstream users {
21
+ server users:4400;
22
+ keepalive 64;
23
+ }
24
+
20
25
proxy_cache_path /etc/nginx/cache levels=1:2 keys_zone=STATIC:10m inactive=24h max_size=1g;
21
26
22
27
limit_conn_zone $binary_remote_addr zone=limit_per_ip:10m;
@@ -94,6 +99,41 @@ http {
94
99
proxy_redirect off ;
95
100
}
96
101
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
+
97
137
location ~ /\. {
98
138
deny all ;
99
139
}
@@ -112,13 +152,19 @@ http {
112
152
root /usr/src/app/dist-web/public;
113
153
try_files $uri$args $uri$args / /index.html;
114
154
index index.html;
115
- }
155
+ }
116
156
117
157
location /api/ {
118
158
gzip_static on ;
119
159
120
160
try_files $uri @app;
121
161
}
162
+
163
+ location /users/ {
164
+ gzip_static on ;
165
+
166
+ try_files $uri @app_users;
167
+ }
122
168
}
123
169
124
170
access_log off ;
0 commit comments