Cookie popup not appearing in published website
gregoryscode opened this issue · 1 comments
gregoryscode commented
Ngx-CookieConsent Version
3.0.1
CookieConsent Version
3.1.1
Angular CLI (or Nx CLI) Version
13.1.4
Node Version
16.14.2
OS Version
Windows 10
Expected Behaviour
After publishing my website, the cookie popup should appear as it appears correctly in localhost.
Actual Behaviour
After publishing my website, the cookie popup doesn't appear. No errors in browser console.
It appears correctly in localhost.
I'm using environment variable to set the cookie domain. But even putting the address manually in the cookie consent config it doesn't work.
export const environment = {
production: true,
cookieDomain: 'mywebsite.com.br'
};
const cookieConfig: NgcCookieConsentConfig = {
cookie: {
domain: environment.cookieDomain
},
palette: {
popup: {
background: "#3f3f3f",
text: "#ffffff",
link: "#ffffff"
},
button: {
background: "#299cff",
text: "#ffffff",
border: "transparent"
}
},
position: 'bottom',
theme: 'classic',
type: 'info',
content: {
message: "Esse website utiliza cookies para garantir uma melhor experiência de navegação e funcionalidades.",
dismiss: "Entendido",
deny: "Rejeitar",
link: "Saiba mais",
href: "https://cookiesandyou.com",
policy: "Política de Cookies"
}
};
imports: [
...
NgcCookieConsentModule.forRoot(cookieConfig)
],
Steps to reproduce the behaviour
- Install ngx-cookieconsent in same version;
- Add environment variable to control the cookie domain;
- Publish website.
gregoryscode commented
I'm using Brave browser, which disables the cookie consent popup. Sorry about the inconvenience.