Skip to content

Make the docker entrypoint use relative backend URL - #871

Merged
sstidl merged 1 commit into
librespeed:masterfrom
scottjasso:patch-1
Oct 23, 2026
Merged

sstidl merged 1 commit into
librespeed:masterfrom
scottjasso:patch-1

Conversation

@scottjasso

Copy link
Copy Markdown
Contributor

The default server-list.json that docker generates uses /backend, an absolute path. This breaks reverse proxying -- instead of example.com/speedtest/backend, requests are going to example.com/backend. Simply changing this to relative backend makes reverse proxying work fine.

@qodo-free-for-open-source-projects

Copy link
Copy Markdown
Contributor

PR Summary by Qodo

Use a relative backend URL in Docker's default server list

🐞 Bug fix 🕐 Less than 5 minutes

Grey Divider

AI Description

• Generate a relative backend URL in Docker's default server list.
• Keep backend requests under the application's path when served behind a reverse proxy.
Diagram

graph TD
  A["Docker entrypoint"] --> B["Default server list"] --> C["Browser speed test"] --> D["Reverse proxy"] --> E["Local backend"]
Loading
High-Level Assessment

Use the relative URL in the generated default: it addresses the path-prefix issue at its source without requiring proxy-specific rewrite rules. Mounted server lists and SERVER_LIST_URL remain unaffected.

Files changed (1) +1 / -1

Bug fix (1) +1 / -1
entrypoint.shGenerate a relative local backend URL +1/-1

Generate a relative local backend URL

• Changes the fallback server-list.json entry from '/backend' to 'backend' when no server list or URL is supplied. This lets browser requests resolve beneath the application's path instead of the domain root.

docker/entrypoint.sh

@qodo-free-for-open-source-projects

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can ask Qodo to dismiss a finding you disagree with, with your reason on record

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@sstidl
sstidl merged commit 06524ab into librespeed:master Oct 23, 2026
@sstidl

sstidl commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator

thank you for pointing that out

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.

2 participants