From 49ba83ea2406935971d3f6bf046dbd42f8fae29a Mon Sep 17 00:00:00 2001 From: evanebb <78433178+evanebb@users.noreply.github.com> Date: Sat, 11 Nov 2023 22:12:32 +0100 Subject: [PATCH] Return 204 if no favicon is defined to fix CSRF token error on initial page load --- docker/nginx/nginx.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docker/nginx/nginx.conf b/docker/nginx/nginx.conf index 92253e3..c95737e 100644 --- a/docker/nginx/nginx.conf +++ b/docker/nginx/nginx.conf @@ -30,10 +30,15 @@ http { server_name _; root /var/www/html; + location / { try_files $uri $uri/ /index.php$is_args$args; } + location = /favicon.ico { + try_files $uri =204; + } + location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass php-fpm:9000;