Relay ICE server and ETag headers from the SFU in the WHIP proxy - #470
Open
cnderrauber wants to merge 2 commits into
Open
Relay ICE server and ETag headers from the SFU in the WHIP proxy#470cnderrauber wants to merge 2 commits into
cnderrauber wants to merge 2 commits into
Conversation
The proxied WHIP handler only kept the SDP answer and the Location header from the SFU response, dropping the rest. Two consequences: - The ICE server advertisement (Link: rel="ice-server", RFC 9725 section 4.6) never reached the publisher, so a WHIP publisher had no way to learn TURN credentials and could not use a relay candidate. - The ETag was replaced with a checksum of the offer, while the SFU validates If-Match on PATCH against the ICE ufrag it sent, so ICE trickle over the proxy could not match. Init now returns a WHIPInitResponse carrying the Link headers and the ETag alongside the answer, and both are relayed to the publisher. The native handler supplies neither, so it keeps the checksum ETag and sends no Link header. Link is added to Access-Control-Expose-Headers so browser publishers can read it. Fixes #459 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
paulwe
approved these changes
Aug 25, 2026
boks1971
approved these changes
Aug 25, 2026
ETag is not a CORS-safelisted response header, so a browser publisher cannot read it and cannot echo it as If-Match on the ICE trickle PATCH. Add it to Access-Control-Expose-Headers on the session creation response and on the PATCH response, which returns an ETag as well. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
biglittlebigben
approved these changes
Aug 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The proxied WHIP handler only kept the SDP answer and the Location header from the SFU response, dropping the rest. Two consequences:
Init now returns a WHIPInitResponse carrying the Link headers and the ETag alongside the answer, and both are relayed to the publisher. The native handler supplies neither, so it keeps the checksum ETag and sends no Link header. Link is added to Access-Control-Expose-Headers so browser publishers can read it.
Fixes #459