1+ events {
2+ worker_connections 1024 ;
3+ }
4+
5+ http {
6+ # Nginx will handle gzip compression of responses from the app server
7+ gzip on;
8+ gzip_proxied any;
9+ gzip_types text/plain application/json;
10+ gzip_min_length 1000 ;
11+
12+ server {
13+ listen 443 ssl ;
14+ server_name localhost;
15+
16+ ssl_certificate nginx.crt;
17+ ssl_certificate_key nginx.key;
18+
19+ client_max_body_size 0;
20+
21+ location ~ "^/[a-z0-9]{32}/geode/" {
22+ if ( $request_method !~ ^( GET|POST|OPTIONS) $) {
23+ return 405 ;
24+ }
25+ rewrite "^/[a-z0-9]{32}/geode/(.*)" /$1 break ;
26+ proxy_pass http ://localhost:5000 ;
27+ proxy_http_version 1.1;
28+ proxy_set_header Host $host ;
29+ proxy_set_header X-Real-IP $remote_addr ;
30+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
31+ proxy_set_header X-Forwarded-Proto $scheme ;
32+ }
33+
34+ location ~ "^/[a-z0-9]{32}/viewer/" {
35+ if ( $request_method !~ ^( GET|POST|OPTIONS) $) {
36+ return 405 ;
37+ }
38+ rewrite "^/[a-z0-9]{32}/viewer/(.*)" /$1 break ;
39+ proxy_pass http ://localhost:1234 ;
40+ proxy_http_version 1.1;
41+ proxy_set_header Host $host ;
42+ proxy_set_header X-Real-IP $remote_addr ;
43+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
44+ proxy_set_header X-Forwarded-Proto $scheme ;
45+
46+ proxy_set_header Connection "keep-alive, Upgrade" ;
47+ proxy_set_header Upgrade websocket;
48+ }
49+ }
50+ }
0 commit comments