-
Notifications
You must be signed in to change notification settings - Fork 8
/
nginx.conf
executable file
·56 lines (43 loc) · 1.3 KB
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
worker_processes auto;
worker_cpu_affinity auto;
events {
}
add_header X-Content-Type-Options nosniff;
http {
server {
listen 443 ssl;
listen [::]:443;
server_tokens off;
server_name _;
ssl_certificate /etc/nginx/puma.crt;
ssl_certificate_key /etc/nginx/puma.key;
ssl_session_cache shared:SSL:1m;
if ($request_method !~ ^(GET|POST|PUT|DELETE|OPTIONS|PATCH)$) {
return 405;
}
location / {
proxy_pass http://sara-alert-enrollment:3000;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Ssl on;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Host $host;
}
location /report {
proxy_pass http://sara-alert-assessment:3000/;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Ssl on;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Host $host;
}
}
server {
listen 80;
listen [::]:80;
server_name _;
return 301 https://$host$request_uri;
}
}