-
Notifications
You must be signed in to change notification settings - Fork 6
/
nginx.conf
33 lines (33 loc) · 941 Bytes
/
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
error_log /tmp/log debug;
# nginx proxy over the UI and API servers, to get around CORS for local
# development. For directive documentation, see
# http://nginx.org/en/docs/dirindex.html
# Required - just leave the defaults for now.
events {}
http {
# These host names are available in a docker-compose environment via
# docker linking.
upstream ui {
server ui:4400;
}
upstream api {
server apise:8390;
}
server {
listen 4400;
# All API requests have a version prefix. Route everything else to
# the UI server.
location /api {
proxy_pass http://api;
}
location / {
proxy_pass http://ui;
# These prevent websocket 400 errors. See
# https://github.com/socketio/socket.io/issues/1942#issuecomment-82352072
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
}
}
}