Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access to pexels fails on Safari and Firefox #48

Open
bskrypnyk opened this issue Apr 5, 2023 · 1 comment
Open

Access to pexels fails on Safari and Firefox #48

bskrypnyk opened this issue Apr 5, 2023 · 1 comment

Comments

@bskrypnyk
Copy link

bskrypnyk commented Apr 5, 2023

Hello.

We are successfully using pexels js library in Chrome. However, when used in Safari - both desktop and mobile, and Firefox, the request fails with these messages in the console:

"Failed to load resource: Request header field User-Agent is not allowed by Access-Control-Allow-Headers."

We are running the latest 1.4.0 version of the library.

@bskrypnyk bskrypnyk changed the title Access to pexels fails on Safari Access to pexels fails on Safari and Firefox Apr 6, 2023
@HeikoTheissen
Copy link

HeikoTheissen commented Dec 28, 2024

The behavior is explained here.

The usage of a special User-Agent header by the Pexels client library does not fit to the fact that the Pexels server does not accept this as a CORS-unsafe header in cross-origin requests.

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

No branches or pull requests

2 participants