-
Notifications
You must be signed in to change notification settings - Fork 122
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
CORS - Credential issue #241
Comments
For the style, you can pass an object instead of a url. Then you could do something like fetch(styleUrl, {credentials: 'include'}).then(response => {
response.json().then(style => {
olms('map', style);
});
}); |
@ahocevar I don't think it will work, because "same-origin" is also hard coded in the applyStyle function. And that one cannot be avoided i think. |
We could either expose a global fetch options object, or you could use a fetch wrapper as additional entry point in your webpack config. If you prefer the former, we'd appreciate a pull request. |
@ahocevar For the moment, i found a solution just by configuring my nginx in a better way. But i keep that ticket in mind. Thank you for you time. |
Hi,
I saw that 'same-origin' is used for the credentials when fetching the style.
Shouldn't this be parametrable ? So we could call olms giving that parameter.
In my case, i need to set "include", but i cannot.
What do you think ?
Thank you for the work.
The text was updated successfully, but these errors were encountered: