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

[BUG] Embedding form prints error about i18n_redirected cookie #681

Open
parasiteoflife opened this issue Jan 27, 2025 · 1 comment
Open
Assignees

Comments

@parasiteoflife
Copy link

Describe the bug
I've embedded the form on a website on a different domain (opnform.domain.io, website.com), in the console I get:

La cookie “i18n_redirected” ha sido rechazada porque se encuentra en un contexto de sitios cruzados y su “SameSite” es “Lax” o “Strict”.

To Reproduce
Publish a form and paste the embed code on a website on a different domain

Expected behavior
I don't actually know what problems that will cause because I haven't deployed the page yet to production but in testings there's that error in console.

Environment (please complete the following information):

  • Environment [Cloud, Docker, Self-hosted, etc.]: Docker
  • Browser [e.g. chrome, safari]: Firefox
  • OpnForm Version [e.g. 22]: 1.5

As a side note, I also get a lot of warnings like this:

Error de mapa de fuente: No sources are declared in this source map.
URL del recurso: https://opnform.domain.io/_nuxt/BE0eY4dB.js 
URL del mapa de fuente: BE0eY4dB.js.map
@JhumanJ
Copy link
Owner

JhumanJ commented Jan 28, 2025

Thanks it seems to be an "issue" related to the i18n library we use (see https://i18n.nuxtjs.org/docs/api/options#cookiesecure)

We need to change this plugin config in nuxt.config.js to something like this:

i18n: {
  // Other i18n options...
  detectBrowserLanguage: {
    cookieSecure: true,       // Add the `SameSite=None; Secure` attribute (required when app is embedded in an iframe)
  },
}

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

3 participants