Skip to content

Remove user-agent from download request header - #72

Open
Brayyy wants to merge 1 commit into
y252328:masterfrom
Brayyy:fix-cors-error
Open

Remove user-agent from download request header#72
Brayyy wants to merge 1 commit into
y252328:masterfrom
Brayyy:fix-cors-error

Conversation

@Brayyy

@Brayyy Brayyy commented May 10, 2025

Copy link
Copy Markdown

Example of the current error:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://scontent-sjc3-1.cdninstagram.com/v/...
(Reason: header ‘user-agent’ is not allowed according to header ‘Access-Control-Allow-Headers’ from CORS preflight response).

The error is fairly cut and dry, I suspect IG/Meta changed their CORS policy sometime recently, blocking requests with "user-agent". Removing "User-Agent" from the outbound fetch headers in downloadResource() fixes the problem.

The fix can be quickly tested by commenting out line :758 and attempting to download media.

@Brayyy Brayyy mentioned this pull request May 10, 2025
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