-
Notifications
You must be signed in to change notification settings - Fork 3
/
nginx-without-ssl.conf
125 lines (105 loc) · 3.89 KB
/
nginx-without-ssl.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
server {
listen 8001 ;
server_name __domain_name__;
server_tokens off;
add_header Strict-Transport-Security "max-age=31536000;";
add_header Permissions-Policy "geolocation=(self), camera=(self), microphone=(self)";
add_header X-Frame-Options SAMEORIGIN;
add_header Referrer-Policy "strict-origin-when-cross-origin";
add_header X-Content-Type-Options "nosniff";
# add_header Content-Security-Policy "default-src * 'unsafe-inline' 'unsafe-eval'; https://accounts.google.com https://api.postalpincode.in https://apis.mappls.com https://fonts.gstatic.com data: img-src 'self' data:";
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
location /search {
proxy_pass http://ref-logistics-protocol-webserver:5556/protocol/v1/search;
proxy_read_timeout 240s;
add_header 'Access-Control-Allow-Origin' '*';
}
location /issue {
proxy_pass http://ref-logistics-protocol-webserver:5556/protocol/v1/issue;
proxy_read_timeout 240s;
add_header 'Access-Control-Allow-Origin' '*';
}
location /issue_status {
proxy_pass http://ref-logistics-protocol-webserver:5556/protocol/v1/issue_status;
proxy_read_timeout 240s;
add_header 'Access-Control-Allow-Origin' '*';
}
location /select {
proxy_pass http://ref-logistics-protocol-webserver:5556/protocol/v1/select;
proxy_read_timeout 240s;
add_header 'Access-Control-Allow-Origin' '*';
}
location /init {
proxy_pass http://ref-logistics-protocol-webserver:5556/protocol/v1/init;
proxy_read_timeout 240s;
add_header 'Access-Control-Allow-Origin' '*';
}
location /confirm {
proxy_pass http://ref-logistics-protocol-webserver:5556/protocol/v1/confirm;
proxy_read_timeout 240s;
add_header 'Access-Control-Allow-Origin' '*';
}
location /cancel {
proxy_pass http://ref-logistics-protocol-webserver:5556/protocol/v1/cancel;
proxy_read_timeout 240s;
add_header 'Access-Control-Allow-Origin' '*';
}
location /update {
proxy_pass http://ref-logistics-protocol-webserver:5556/protocol/v1/update;
proxy_read_timeout 240s;
add_header 'Access-Control-Allow-Origin' '*';
}
location /track {
proxy_pass http://ref-logistics-protocol-webserver:5556/protocol/v1/track;
proxy_read_timeout 240s;
add_header 'Access-Control-Allow-Origin' '*';
}
location /status {
proxy_pass http://ref-logistics-protocol-webserver:5556/protocol/v1/status;
proxy_read_timeout 240s;
add_header 'Access-Control-Allow-Origin' '*';
}
location /support {
proxy_pass http://ref-logistics-protocol-webserver:5556/protocol/v1/support;
proxy_read_timeout 240s;
add_header 'Access-Control-Allow-Origin' '*';
}
location /socket {
proxy_set_header Connection '';
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_pass http://logistics:3020/api/;
add_header 'Access-Control-Allow-Origin' '*';
proxy_buffering off;
proxy_cache off;
}
location /api/v1/agent/sse {
proxy_set_header Connection '';
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_pass http://logistics:3020/api/v1/agent/sse;
add_header 'Access-Control-Allow-Origin' '*';
proxy_buffering off;
proxy_cache off;
}
location /api/{
proxy_pass http://logistics:3020/api/;
proxy_read_timeout 240s;
add_header Access-Control-Allow-Origin *;
}
location /protocol/ {
proxy_pass http://ref-logistics-protocol-webserver:5556/protocol/;
proxy_read_timeout 240s;
add_header 'Access-Control-Allow-Origin' '*';
}
location / {
root /usr/share/nginx/html;
index index.html;
try_files $uri $uri/ /index.html;
}
}