Skip to content
This repository was archived by the owner on Jan 7, 2026. It is now read-only.

Fix path being added to query string#229

Merged
ildyria merged 3 commits intomasterfrom
fix-query-string
May 27, 2025
Merged

Fix path being added to query string#229
ildyria merged 3 commits intomasterfrom
fix-query-string

Conversation

@ildyria
Copy link
Copy Markdown
Member

@ildyria ildyria commented May 27, 2025

This is modifications of the nginx to take care of the annoying addition of the path into the url.
This had the nasty effect of breaking:

  1. Oauth registration
  2. Temporary image links

Tested locally to resolve the above mentioned issued.
We no longer also directly try to serve the static files/images as they lose their query string for some unknown reasons, (honestly, I am done digging)

Source of the nginx config: https://laravel.com/docs/12.x/deployment#nginx


This pull request updates the default.conf file for the web server configuration, focusing on improving compatibility, security, and maintainability. The most important changes include adding IPv6 support, refining static file handling, and improving PHP request processing.

Compatibility improvements:

  • Added support for IPv6 by including listen [::]:80; in the server block.

Static file and request handling:

  • Replaced the old static file handling block with more specific locations for /favicon.ico and /robots.txt, disabling access logs and "not found" logs for these files.
  • Simplified the request routing logic by replacing the if condition with try_files in the root location block.

PHP processing improvements:

  • Updated the PHP fastcgi configuration to use $realpath_root for SCRIPT_FILENAME and added fastcgi_hide_header X-Powered-By to enhance security.
  • Modified the fastcgi_pass directive to use the correct path (/var/run/php/php8.4-fpm.sock) for PHP-FPM.

Copy link
Copy Markdown
Contributor

@d7415 d7415 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can tell it will still serve the static files directly, it will just now log it.

Not sure why this was affecting the URL (unless there's a weird default I'm not seeing, or Laravel's doing something screwy, which wouldn't be entirely new).

But sure.

Comment thread default.conf Outdated
Co-authored-by: Martin Stone <1611702+d7415@users.noreply.github.com>
@ildyria
Copy link
Copy Markdown
Member Author

ildyria commented May 27, 2025

Not sure why this was affecting the URL (unless there's a weird default I'm not seeing, or Laravel's doing something screwy, which wouldn't be entirely new).

When trying to access signed url, we no longer directly go to the file, we use Lychee as proxy but the ending is still .jpg etc...

With that image chunk, the registrations links works (use signature) but the images do not. :|

@ildyria ildyria merged commit e9940c1 into master May 27, 2025
1 check passed
@ildyria ildyria deleted the fix-query-string branch May 27, 2025 20:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants