Return 204 if no favicon is defined to fix CSRF token error on initial page load

This commit is contained in:
evanebb 2023-11-11 22:12:32 +01:00
parent 2c96f026bd
commit 49ba83ea24
No known key found for this signature in database

View file

@ -30,10 +30,15 @@ http {
server_name _; server_name _;
root /var/www/html; root /var/www/html;
location / { location / {
try_files $uri $uri/ /index.php$is_args$args; try_files $uri $uri/ /index.php$is_args$args;
} }
location = /favicon.ico {
try_files $uri =204;
}
location ~ \.php$ { location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass php-fpm:9000; fastcgi_pass php-fpm:9000;