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

cookie without secure attribute warning #84

Open
cifsl opened this issue Jun 6, 2022 · 1 comment
Open

cookie without secure attribute warning #84

cifsl opened this issue Jun 6, 2022 · 1 comment

Comments

@cifsl
Copy link

cifsl commented Jun 6, 2022

Firefox (v100.0.2 64 bit) console show this warning:

Cookie “smarket-manager.currentWebPackBundleHash” will be soon rejected because it has the “SameSite” attribute set to “None” or an invalid value, without the “secure” attribute. To know more about the “SameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite

[basil.min.js:1:3750]

(https://cdn.jsdelivr.net/npm/basil.js@0.4.11/build/basil.min.js)

I'm using basil with this code:

window.smarket.storage = new window.Basil({
          namespace: 'smarket-manager',
          storages: ['local', 'cookie', 'session', 'memory'],
          storage: 'local',
          expireDays: 3650
        });
        window.smarket.storage.set('currentWebPackBundleHash', initialState.currentBundleHash);
@guillaumepotier
Copy link
Member

Hi there,

Try to add the sameSite option in your constructor, like this:

window.smarket.storage = new window.Basil({
          namespace: 'smarket-manager',
          storages: ['local', 'cookie', 'session', 'memory'],
          storage: 'local',
          sameSite: 'Lax',
          expireDays: 3650
        });
window.smarket.storage.set('currentWebPackBundleHash', initialState.currentBundleHash);

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