diff --git a/nginx.conf.sigil b/nginx.conf.sigil index 9c3fedc..a812601 100644 --- a/nginx.conf.sigil +++ b/nginx.conf.sigil @@ -1,4 +1,4 @@ -# sigil ver 2.1 dufok 2022-10-11 +# sigil ver 2.2 dufok 2022-10-15 (with location /connect nobuffer) # Proxy settings {{ $proxy_settings := "proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $http_connection; proxy_set_header Host $http_host; proxy_set_header X-Request-Start $msec;" }} # GZIP settings @@ -47,19 +47,12 @@ server { # Default location block location / { - proxy_pass http://172.17.0.28:8080; - add_header 'Cache-Control' 'no-cache'; - add_header 'Content-Type' 'text/event-stream'; - add_header 'Connection' 'keep-alive'; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - proxy_buffering off; - proxy_cache off; - proxy_read_timeout 36000s; - {{ $proxy_settings }} - {{ $cors_headers_options }} - {{ $cors_headers_post }} - {{ $cors_headers_get }} + proxy_pass http://{{ $.APP }}-{{ $upstream_port }}; + {{ $proxy_settings }} + {{ $gzip_settings }} + {{ $cors_headers_options }} + {{ $cors_headers_post }} + {{ $cors_headers_get }} } # Error pages @@ -102,4 +95,4 @@ upstream {{ $.APP }}-{{ $upstream_port }} { server {{ $listener_ip }}:{{ $upstream_port }}; {{ end }} } -{{ end }} \ No newline at end of file +{{ end }} diff --git a/src/main.rs b/src/main.rs index 8b2aea4..1dfc4b9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -64,7 +64,7 @@ async fn connect_handler( ServerError("Internal Server Error") })?; - let (tx, mut rx) = broadcast::channel(100); + let (tx, rx) = broadcast::channel(100); let state_clone = state.clone(); let handle = tokio::spawn(async move { let conn = state_clone.redis.get_async_connection().await.unwrap();