Skip to content

Conversation

@svenvg93
Copy link
Contributor

@svenvg93 svenvg93 commented Jan 5, 2026

Warning

If the user does not have the APP_URL set after this fix it will redirect them to http://localhost

📃 Description

This PR makes sure that we handle APP_URL with subpaths better.

closes #2596

Docs Update: alexjustesen/speedtest-tracker-docs#105

🪵 Changelog

✏️ Changed

  • honor the APP_URL variable when generating urls inside the application

❔ Tests

This PR was tests with the added test cases.
As well manual with the following NGINX config

NGINX Config
server {
    listen 80;
    server_name localhost;

    # Main location for subpath
    location /speedtest/ {
        proxy_pass http://speedtest-tracker-laravel.test-1:80/;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Port $server_port;

        # WebSocket support
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";

        # Increase timeouts for long-running requests
        proxy_read_timeout 300;
        proxy_connect_timeout 300;
        proxy_send_timeout 300;
    }

    # Redirect root to subpath
    location = / {
        return 301 /speedtest/;
    }
}

Both the in App notifications and in all the requests the correct URL is used.

Scherm­afbeelding 2026-01-05 om 18 03 46 Scherm­afbeelding 2026-01-05 om 18 02 23

@svenvg93 svenvg93 requested a review from alexjustesen as a code owner January 5, 2026 17:19
@alexjustesen
Copy link
Owner

Linking to #2541

@alexjustesen
Copy link
Owner

During testing this introduced a breaking change which we're not going to tackle at this moment.

@svenvg93 svenvg93 deleted the 2596-fix-app-url-sub-paths branch January 15, 2026 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Notification Panel links are missing port number

2 participants