Fix sample loading: Apollo preflight headers + Windows Cloudflare 403#35
Open
Exorsky wants to merge 1 commit into
Open
Fix sample loading: Apollo preflight headers + Windows Cloudflare 403#35Exorsky wants to merge 1 commit into
Exorsky wants to merge 1 commit into
Conversation
|
yeah cloudflare may have caught on i'll look into it |
|
I'll make a fork when its done. |
|
https://github.com/6faw/Splicerr-2/releases/tag/v2.0.1 please try this |
…uest Sample loading is currently broken; a few Splice/Cloudflare changes stack up: 1. The GraphQL API requires the Apollo preflight headers (apollo-require-preflight, x-apollo-operation-name). 2. On Windows, tauri-plugin-http injects Origin: http://tauri.localhost, which Splice's Cloudflare blocks with a 403 (macOS is unaffected, its webview origin differs). The plugin forces its own Origin, so overriding it from JS does not help. 3. A spoofed Chrome User-Agent combined with a non-browser TLS fingerprint trips Cloudflare's bot challenge, so we send no User-Agent at all. Send the request from a small Rust command (splice_graphql) using reqwest directly: it sets the Apollo headers, sends no localhost Origin and no browser User-Agent, so Cloudflare accepts it on every platform. Audio/S3 fetches stay on the http plugin (not behind Cloudflare, so unaffected). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
73ee0f7 to
20abbfd
Compare
|
@6faw man, what about Mac OS on silicon? |
This version actually worked for me at first! I literally went to make some tea, and when I came back... |
Author
|
@witherwithme While Robert didn't pushed new version with fix, you can use this version. |
|
The app works perfectly now, but when specifying "Most popular" the search crashes, or "most popular" is combined with the "most relevant" data. |
Never built for mac before sadly |
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.

Two issues broke sample loading:
Splice's GraphQL API now requires the Apollo preflight headers (apollo-require-preflight, x-apollo-operation-name); without them requests fail with "something went wrong". Fix by @6faw
On Windows, tauri-plugin-http injects
Origin: http://tauri.localhostinto outgoing requests, and Splice's Cloudflare protection blocks that exact Origin value with a 403 (macOS is unaffected, its webview origin differs). The plugin forces its own Origin, so overriding it from JS doesn't help.Send the GraphQL request from a small Rust command (
splice_graphql) using reqwest directly: it sets the required Apollo headers and sends no localhost Origin, so Cloudflare accepts it on all platforms. Audio/S3 fetches stay on the http plugin (not behind Cloudflare, so unaffected).