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

Custom User-Agent disrupts functionality on Safari #10693

Open
nothowstorygoes opened this issue Aug 13, 2024 · 0 comments
Open

Custom User-Agent disrupts functionality on Safari #10693

nothowstorygoes opened this issue Aug 13, 2024 · 0 comments
Labels
API READ All READ APIs include Product, Search…

Comments

@nothowstorygoes
Copy link

What

  • I'm developing a nutrition PWA to expand my portfolio using your database for nutrition values of products. I have set a custom user agent as per your request from the documentation, but using a custom user agent on ssafari blocks the fetch request and returns no response.
    On chrome it works fine, even though the User Agent is the default one as you can see on the network tab below. On safari the custom User-Agent blocks the request.

Additional context

image
This is the user agent on chrome

customUserAgent is a string contaning the requested infos.

code : response = await fetch(
https://world.openfoodfacts.org/cgi/search.pl?search_terms=${productName}&search_simple=1&action=process&json=1,
{
method: "GET",
headers: {
"User-Agent": customUserAgent,
},
}
);

@github-project-automation github-project-automation bot moved this to To discuss and validate in 🍊 Open Food Facts Server issues Aug 13, 2024
@teolemon teolemon added the 🐛 bug This is a bug, not a feature request. label Aug 24, 2024
@teolemon teolemon removed the 🐛 bug This is a bug, not a feature request. label Oct 18, 2024
@teolemon teolemon added the API READ All READ APIs include Product, Search… label Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API READ All READ APIs include Product, Search…
Projects
Status: To discuss and validate
Status: To be triaged
Development

No branches or pull requests

2 participants