[GH-ISSUE #21] CORS Error when fetching #15

Closed
opened 2026-02-27 19:05:19 +03:00 by kerem · 2 comments
Owner

Originally created by @LemonProg on GitHub (Aug 18, 2023).
Original GitHub issue: https://github.com/akashrchandran/spotify-lyrics-api/issues/21

Hey, I am using this api in a Node.js website, but when I try to fetch any song, i got this error :
Access to fetch at 'https://spotify-lyric-api.herokuapp.com/?trackid=1GelyurdH5LBWReoScJF59' from origin 'http://localhost:3000' has been blocked by CORS policy: Request header field content-type is not allowed by Access-Control-Allow-Headers in preflight response.
To fix that I tried to use some cors proxy, but there are not stable, so can you please fix the API to allow every origins ? Or if you want, here my production url "https://lemon-typer.onrender.com/", so you can only allow trusted website. Thank you

Originally created by @LemonProg on GitHub (Aug 18, 2023). Original GitHub issue: https://github.com/akashrchandran/spotify-lyrics-api/issues/21 Hey, I am using this api in a Node.js website, but when I try to fetch any song, i got this error : `Access to fetch at 'https://spotify-lyric-api.herokuapp.com/?trackid=1GelyurdH5LBWReoScJF59' from origin 'http://localhost:3000' has been blocked by CORS policy: Request header field content-type is not allowed by Access-Control-Allow-Headers in preflight response.` To fix that I tried to use some cors proxy, but there are not stable, so can you please fix the API to allow every origins ? Or if you want, here my production url "https://lemon-typer.onrender.com/", so you can only allow trusted website. Thank you
kerem closed this issue 2026-02-27 19:05:19 +03:00
Author
Owner

@akashrchandran commented on GitHub (Aug 18, 2023):

I believe I've resolved the problem. Could you kindly verify it and let me know your feedback?

<!-- gh-comment-id:1684161235 --> @akashrchandran commented on GitHub (Aug 18, 2023): I believe I've resolved the problem. Could you kindly verify it and let me know your feedback?
Author
Owner

@LemonProg commented on GitHub (Aug 18, 2023):

I fixed my issue using cors anywhere, but I can tell you if it's working tonight 👍🏻

<!-- gh-comment-id:1684262577 --> @LemonProg commented on GitHub (Aug 18, 2023): I fixed my issue using cors anywhere, but I can tell you if it's working tonight 👍🏻
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify-lyrics-api#15
No description provided.