Skip to content

Commit

Permalink
LEAF-4614 - double slash
Browse files Browse the repository at this point in the history
  • Loading branch information
shane committed Jan 17, 2025
1 parent c366db3 commit cba0f86
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions docker/nginx/leaf_nginx.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ server {
root /var/www/html;
index index.php index.html index.htm;

# if slashes appear in the uri, we want to remove them.
if ($request_uri ~ "//") {
return 301 $uri;
}

#this is for everything except gallery.php and svgs since those need to load still
location ~* ^(.*)/libs/dynicons(?!(/gallery.php|/(.*).svg)){

Expand All @@ -37,6 +42,7 @@ server {
}

location ~ \.php$ {
rewrite ^//(.*)$ /$1 break;
try_files $uri $uri/ /index.php =404;
fastcgi_pass ${LEAF_POD}:9000;
fastcgi_index index.php;
Expand Down

0 comments on commit cba0f86

Please sign in to comment.