mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
fix(docker): rewrite trailing slashes to non-trailing in nginx config
Without this rewriting, we've been running into conversing with HTTP over HTTPS (400 Bad Request). TODO: Refactor this entire nginx config to something a bit more simple and clean. Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
6d4e8028eb
commit
1ee8d177b4
1 changed files with 5 additions and 8 deletions
|
@ -94,6 +94,8 @@ http {
|
|||
ssl_certificate /etc/ssl/certs/web.cert.pem;
|
||||
ssl_certificate_key /etc/ssl/private/web.key.pem;
|
||||
|
||||
rewrite ^/(.*)/$ /$1 permanent;
|
||||
|
||||
location ~ ^/[^\/]+\.gz$ {
|
||||
# Override mime type to text/plain.
|
||||
types { text/plain gz; }
|
||||
|
@ -113,10 +115,6 @@ http {
|
|||
add_header ETag "";
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri @proxy_to_app;
|
||||
}
|
||||
|
||||
location ~ "^/([a-z0-9][a-z0-9.+_-]*?)(\.git)?/(git-(receive|upload)-pack|HEAD|info/refs|objects/(info/(http-)?alternates|packs)|[0-9a-f]{2}/[0-9a-f]{38}|pack/pack-[0-9a-f]{40}\.(pack|idx))$" {
|
||||
include uwsgi_params;
|
||||
uwsgi_pass smartgit;
|
||||
|
@ -136,13 +134,12 @@ http {
|
|||
uwsgi_pass uwsgi://cgit-fastapi;
|
||||
}
|
||||
|
||||
location @proxy_to_app {
|
||||
location / {
|
||||
proxy_pass http://asgi_backend;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_redirect off;
|
||||
proxy_buffering off;
|
||||
proxy_pass http://asgi_backend;
|
||||
proxy_set_header X-Forwarded-Ssl on;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue