I have a weird bug in my Laravel application where, when I use a file extension in the URL, the application is logging out automatically.
After investigating I noticed it only happens when using valid file extensions on existing routes (except for /login). It does not even reach the controller.
Does not work: /home?file=test.png (logs out and redirects to login page)
Works: /home?file=test.abc (noenter code heren-existing file extension, works fine)
Works: /login?file=test.png (shows login page, but session is not lost)
Works: /non-existing-route?file=test.png (shows 404 but session is not lost)
In my development environment (XAMPP) I'm having no issues at all, only in production. I also checked .htaccess but there is nothing going on there either.
I'm using Laravel 9 in combination with the Tenancy for Laravel package.
Suggestions would be appreciated!