-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
43 lines (36 loc) · 1.46 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
events {
worker_connections 1024;
}
http {
# Reverse proxy for all containers
# Maps inbound traffic on <server_ip>:8080/{...} to appropriate container on container port (not exposed)
server {
listen 8080;
location / {
proxy_pass http://web_demo:80;
if ($request_method ~* "(GET|POST)") {
add_header "Access-Control-Allow-Origin" *;
}
if ($request_method = OPTIONS ) {
add_header "Access-Control-Allow-Origin" *;
add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS, HEAD";
add_header "Access-Control-Allow-Headers" "Authorization, Origin, X-Requested-With, Content-Type, Accept";
return 200;
}
proxy_set_header X-Forwarded-For $remote_addr;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
}
location /chatbot {
proxy_pass http://chatbot:5005/webhooks/rest/webhook;
proxy_set_header X-Forwarded-For $remote_addr;
}
location /chatbot-actions {
proxy_pass http://chatbot_actions:5055/webhook;
proxy_set_header X-Forwarded-For $remote_addr;
}
}
}