Skip to content

Leave full URLs in VIDEO_FILE untouched - #162

Merged
modem7 merged 2 commits into
masterfrom
fix/video-file-url-passthrough
Sep 19, 2026
Merged

modem7 merged 2 commits into
masterfrom
fix/video-file-url-passthrough

Conversation

@modem7

@modem7 modem7 commented Sep 19, 2026

Copy link
Copy Markdown
Owner

What

Leave VIDEO_FILE untouched in the generated HTML when it's a full URL, and only add the leading / to filenames and paths.

Why

#160 fixed the video 404ing on multi-segment paths by always emitting /${VIDEO_FILE#/}. That's right for filenames, but it also prefixes URLs, so VIDEO_FILE=https://example.com/v.mp4 became src="/https://example.com/v.mp4". That worked before #160.

Change

  • scripts/index/80-index.sh: skip the prefix when the value contains ://.
  • .github/workflows/test.yml: new container run with VIDEO_FILE=https://example.com/v.mp4, asserting the src is left as-is. Nothing covered URLs before.
  • README.md: VIDEO_FILE row now says a full URL is accepted and used as-is.

Tested

Built the image and checked the src on /some/random/path:

VIDEO_FILE src
default /video.mp4
custom.mp4 /custom.mp4
/video.mp4 /video.mp4
https://example.com/v.mp4 https://example.com/v.mp4

The URL container also starts and passes the healthcheck.

@modem7 modem7 added the bug Something isn't working label Sep 19, 2026
@modem7
modem7 merged commit d42ad58 into master Sep 19, 2026
5 checks passed
@modem7
modem7 deleted the fix/video-file-url-passthrough branch September 19, 2026 22:05
@Trainmaster2

Copy link
Copy Markdown
Contributor

Good catch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants