blockstream-satellite-api/nginx/nginx.conf
Blockstream Satellite f2058ac3f8 Add admin route for SSE on get-protected channels
The auth channel does not allow users to get messages (access them over
the internet). Hence, a regular SSE client should not be able to monitor
the events generated on the auth channel. In contrast, an admin host
should be able to monitor the auth events. For that, this patch adds an
/admin/subscribe endpoint that is SSL-authenticated in production, so
only the admin hosts can connect to it.
2023-02-02 17:16:12 -03:00

26 lines
No EOL
824 B
Nginx Configuration File

server {
listen 80;
server_name proxy_server;
location / {
# Based on https://docs.gunicorn.org/en/stable/deploy.html
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://api-server:9292/;
}
location /subscribe/ {
proxy_buffering off;
proxy_request_buffering off;
proxy_cache off;
proxy_http_version 1.1;
proxy_pass http://sse-server:4500/stream?channels=;
}
location /admin/subscribe/ {
proxy_buffering off;
proxy_request_buffering off;
proxy_cache off;
proxy_http_version 1.1;
proxy_pass http://sse-server:4500/admin/stream?channels=;
}
}