This commit is contained in:
zino
2025-09-23 09:59:09 +02:00
parent 293e2ff735
commit f98d5e6b44

View File

@@ -20,26 +20,6 @@ server {
location ~ ^/(locales/|locales\.json|admin/|static/|pluginfw/|javascripts/|socket\.io/|ep/|minified/|api/|ro/|error/|jserror|redirect|favicon\.ico|robots\.txt|indexBootstrap-.*\.js)$ { location ~ ^/(locales/|locales\.json|admin/|static/|pluginfw/|javascripts/|socket\.io/|ep/|minified/|api/|ro/|error/|jserror|redirect|favicon\.ico|robots\.txt|indexBootstrap-.*\.js)$ {
set $upstream "http://etherpad:9001"; set $upstream "http://etherpad:9001";
proxy_pass $upstream; proxy_pass $upstream;
proxy_buffering off;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header Upgrade $http_upgrade; # websockets
proxy_set_header Connection $connection_upgrade;
}
location ~ ^/(?!locales/|locales\.json|admin/|static/|pluginfw/|javascripts/|socket\.io/|ep/|minified/|api/|ro/|error/|jserror|redirect|favicon\.ico|robots\.txt|indexBootstrap-.*\.js)([^/].+)$ {
return 301 /p/$1;
}
location = / {
set $upstream "http://etherpad:9001";
proxy_pass $upstream;
proxy_buffering off; proxy_buffering off;
proxy_http_version 1.1; proxy_http_version 1.1;
proxy_set_header Host $host; proxy_set_header Host $host;
@@ -50,6 +30,38 @@ server {
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade; proxy_set_header Connection $connection_upgrade;
} }
location = / {
set $upstream "http://etherpad:9001";
proxy_pass $upstream;
proxy_buffering off;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
location ^~ /p/ {
set $upstream "http://etherpad:9001";
proxy_pass $upstream;
proxy_buffering off;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
location / {
return 301 /p$uri$is_args$args;
}
} }
server { server {