-
Notifications
You must be signed in to change notification settings - Fork 2
/
server.dev-host.conf
68 lines (56 loc) · 2.51 KB
/
server.dev-host.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
server {
large_client_header_buffers 4 32k; # Required for OAuth2 Proxy
listen 8080;
server_name localhost;
# server_name 0.0.0.0;
error_page 500 502 503 504 /50x.html;
# Don't let failing api endpoint stall other requests to long, only relevant over http1.1 / local dev env
proxy_read_timeout 10;
location /api/ {
# proxy_pass https://server-radix-api-dev.dev.radix.equinor.com; #for k8s hosted API
proxy_pass http://localhost:3002; #for localhost API on Linux
# proxy_pass http://<WSL_IP>:3002; #for localhost API on WSL
# proxy_pass http://host.docker.internal:3002; #for localhost API on MacOS https://docs.docker.com/desktop/networking/#i-want-to-connect-from-a-container-to-a-service-on-the-host
proxy_set_header Authorization "Bearer $http_x_forwarded_access_token";
proxy_set_header x-forwarded-access-token "";
}
location /cost-api/ {
proxy_pass https://server-radix-cost-allocation-api-qa.dev.radix.equinor.com/api/v1/; #for k8s hosted API
# proxy_pass http://localhost:3003/api/v1/; #for localhost API
proxy_set_header Authorization "Bearer $http_x_forwarded_access_token";
proxy_set_header x-forwarded-access-token "";
}
location /uptime/ {
proxy_pass https://uptime.ext-mon.radix.equinor.com/;
}
location /log-api/ {
proxy_pass https://server-radix-log-api-qa.dev.radix.equinor.com/api/v1/;
proxy_set_header Authorization "Bearer $http_x_forwarded_access_token";
proxy_set_header x-forwarded-access-token "";
}
location /scan-api/ {
proxy_pass https://server-radix-vulnerability-scanner-api-qa.dev.radix.equinor.com/api/v1/;
proxy_set_header Authorization "Bearer $http_x_forwarded_access_token";
proxy_set_header x-forwarded-access-token "";
}
location / {
proxy_pass http://localhost:3000/; #Linux
# proxy_pass http://web:3000/; #MacOS
proxy_set_header x-forwarded-access-token "";
# WebSocket support, for auto-refresh
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
}
location = /50x.html {
root /usr/share/nginx/html;
sub_filter_once on;
sub_filter HTTP_STATUS_CODE $status;
}
location = /config/inject-env.js {
root /usr/share/nginx/html;
try_files /inject-env.js =404;
}
}