Fix sample loading: Apollo preflight headers + Windows Cloudflare 403 - #35
Fix sample loading: Apollo preflight headers + Windows Cloudflare 403#35Exorsky 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... |
|
@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 |
|
@6faw it happened again |
I know. Unfortunately, I am unable to maintain any further changes as I am working on a private hoster for me and my colleagues. For now, please download this fork instead. |


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).