Add client side CORS check for prefix services#49
Merged
Conversation
There was a problem hiding this comment.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Infrastructure as Code | View in Orca | ||
| OSS Licenses | View in Orca | ||
| Malicious Packages | View in Orca | ||
| SAST | View in Orca | ||
| Secrets | View in Orca | ||
| Vulnerabilities | View in Orca |
LBRDan
approved these changes
Jul 3, 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.
Our server-side HTTP HEAD measurements are performed by a Lambda function, not a browser, so they never trigger CORS. However, in-browser playback technologies such as HLS (commonly implemented via hls.js) fetch media segments using cross-origin fetch/XHR requests, which do require the target server to respond with proper Access-Control-Allow-Origin headers, unlike a plain
<audio>/<video>tag.This complementary, browser-only signal is surfaced automatically, as soon as an endpoint's detail page loads, by performing a live check directly from your own browser against a prefix service's URL, resulting in either a:
This check is only available for prefix services. We intentionally leave enclosure URLs out of scope: anyone shipping HLS video already has to satisfy Apple's own requirements around CORS, so there's little value in re-verifying it here.
Under the hood, the check performs an HTTP HEAD request from your browser and confirms that the full redirect chain completes successfully. We don't surface the response headers themselves, since depending on the browser and the server's Access-Control-Expose-Headers configuration, they may not actually be made available to JavaScript.