Skip to content

fix(streaming): send an origin to the video gateway - #279

Merged
edospadoni merged 1 commit into
mainfrom
fix/video-gateway-origin
Nov 27, 2026
Merged

edospadoni merged 1 commit into
mainfrom
fix/video-gateway-origin

Conversation

@edospadoni

Copy link
Copy Markdown
Member

The door phone video is never shown in the released NethLink, while it works in dev mode. NethServer/dev#7535

The pages of the packaged app are loaded from file://, so the requests to the video gateway (WHEP) carry no Origin header while Chromium marks them as cross-site. MediaMTX refuses such requests with 403 before checking their token, so the video stays "not available". In dev mode the pages come from the Vite server, which sends an origin, and the video plays. NethLink now gives the requests to /streaming-gw/ the origin of the gateway when they have none: access is still granted only by the token of the request.

How to test

  • Build NethLink (not dev mode) and sign in to a NethVoice with a door phone video source.
  • Call the door phone, or receive a call from it: the live video is shown instead of "Video not available".
  • In the gateway logs (Traefik access log), the POST /streaming-gw/<source>/whep answer is 201, not 403.

See also

The pages of the packaged app are loaded from file://, so the WHEP
requests to the video gateway carry no Origin header while Chromium
marks them as cross-site. MediaMTX refuses them with 403 before
checking the token, and the door phone video is never shown. In dev
mode the pages come from the Vite server, which sends an origin.

Send the requests to the video gateway with the origin of the gateway
when they have none: the access is still granted by the token only.
@edospadoni edospadoni self-assigned this Nov 27, 2026
@edospadoni
edospadoni merged commit 7d5eedf into main Nov 27, 2026
4 checks passed
@edospadoni
edospadoni deleted the fix/video-gateway-origin branch November 27, 2026 15:11
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.

1 participant