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

CORS error from freegeoip.app with enabled cookie bar #731

Open
thinkh opened this issue Jun 3, 2022 · 1 comment
Open

CORS error from freegeoip.app with enabled cookie bar #731

thinkh opened this issue Jun 3, 2022 · 1 comment
Labels
type: bug Something isn't working

Comments

@thinkh
Copy link
Member

thinkh commented Jun 3, 2022

  • Release number or git hash: develop 1a6c541
  • Web browser version and OS: Chrome 102
  • Environment (local or deployed): both

Steps to reproduce

  1. Open any app with enabled cookie bar in a private window (e.g., https://ordino-daily.caleydoapp.org/app/)
  2. Inspect the network requests in the developer tools

Observed behavior

grafik

Expected behavior

The request should not fail

@thinkh thinkh added the type: bug Something isn't working label Jun 3, 2022
@thinkh
Copy link
Member Author

thinkh commented Jun 3, 2022

It's a know issue in the cookie-bar repository: ToX82/cookie-bar#125 and it seems ipbase requires an API key for every call : ipbase.com/pricing.

The only proposed "solution" in this thread is to disable the geoip feature with the nogeoip config flag.

An alternative would be to research different cookie bar options and replace our implementation.

private addEUCookieDisclaimer() {
if (!this.options.showCookieDisclaimer) {
return;
}
const script = document.createElement('script');
script.type = 'text/javascript';
script.async = true;
script.src = 'https://cdn.jsdelivr.net/npm/cookie-bar/cookiebar-latest.min.js?theme=flying';
script.onload = () => {
setupCookieBar();
};
this.parent.ownerDocument.body.appendChild(script);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant