website/docs: add websocket support to nginx snippets (#9220)
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
@ -1,6 +1,10 @@
|
|||||||
For Nginx Proxy Manager you can use this snippet
|
|
||||||
|
|
||||||
```
|
```
|
||||||
|
# Upgrade WebSocket if requested, otherwise use keepalive
|
||||||
|
map $http_upgrade $connection_upgrade_keepalive {
|
||||||
|
default upgrade;
|
||||||
|
'' '';
|
||||||
|
}
|
||||||
|
|
||||||
# Increase buffer size for large headers
|
# Increase buffer size for large headers
|
||||||
# This is needed only if you get 'upstream sent too big header while reading response
|
# This is needed only if you get 'upstream sent too big header while reading response
|
||||||
# header from upstream' error when trying to access an application protected by goauthentik
|
# header from upstream' error when trying to access an application protected by goauthentik
|
||||||
@ -16,6 +20,9 @@ location / {
|
|||||||
# Set any other headers your application might need
|
# Set any other headers your application might need
|
||||||
# proxy_set_header Host $host;
|
# proxy_set_header Host $host;
|
||||||
# proxy_set_header ...
|
# proxy_set_header ...
|
||||||
|
# Support for websocket
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection $connection_upgrade_keepalive;
|
||||||
|
|
||||||
##############################
|
##############################
|
||||||
# authentik-specific config
|
# authentik-specific config
|
||||||
|
|||||||
@ -1,4 +1,10 @@
|
|||||||
```
|
```
|
||||||
|
# Upgrade WebSocket if requested, otherwise use keepalive
|
||||||
|
map $http_upgrade $connection_upgrade_keepalive {
|
||||||
|
default upgrade;
|
||||||
|
'' '';
|
||||||
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
# SSL and VHost configuration
|
# SSL and VHost configuration
|
||||||
listen 443 ssl http2;
|
listen 443 ssl http2;
|
||||||
@ -18,6 +24,9 @@ server {
|
|||||||
# proxy_pass http://localhost:5000;
|
# proxy_pass http://localhost:5000;
|
||||||
# proxy_set_header Host $host;
|
# proxy_set_header Host $host;
|
||||||
# proxy_set_header ...
|
# proxy_set_header ...
|
||||||
|
# Support for websocket
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection $connection_upgrade_keepalive;
|
||||||
|
|
||||||
##############################
|
##############################
|
||||||
# authentik-specific config
|
# authentik-specific config
|
||||||
|
|||||||
Reference in New Issue
Block a user