forked from erankitcs/BookStoreAppOnEKS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.conf
32 lines (29 loc) · 967 Bytes
/
default.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
server {
listen 80;
server_name _;
location / {
proxy_pass http://front-end/;
}
location /resources-api/ {
proxy_pass http://resources-api:5000/;
}
location /inventory-api/ {
proxy_pass http://inventory-api:5001/;
}
location /renting-api/ {
proxy_pass http://renting-api:5004/;
}
location /clients-api/ {
if ($request_method = 'POST') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, PUT, DELETE';
add_header 'Access-Control-Allow-Headers' 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
}
proxy_pass http://clients-api:5003/;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}