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

Config for disabling Splunk logging at run time #99

Open
chrimesdev opened this issue Feb 10, 2020 · 3 comments
Open

Config for disabling Splunk logging at run time #99

chrimesdev opened this issue Feb 10, 2020 · 3 comments

Comments

@chrimesdev
Copy link
Member

chrimesdev commented Feb 10, 2020

We need the ability to disable Splunk logging when consuming the banner in applications. If the application is not on the nhs.uk domain there are console errors when the banner is interacted with.

Screenshot 2020-06-21 at 14 05 50

Mike's comment on this issue shows that the logging URL is hard-coded which is specific to nhs.uk only.

https://github.com/nhsuk/cookie-consent#script-options

There is a config for disabling/enabling at build time but nothing at run time.

@mikemonteith
Copy link
Contributor

Also, the logging URL is hard-coded to a specific NHS url, making this less usable for others:

`https://www.nhs.uk/our-policies/cookies-policy/?policy-action=${route}`

@mikemonteith
Copy link
Contributor

Maybe there should be a config option more like LOGGING_URL which can be set to any URL

@Spencerooni
Copy link

I've just came across this too. Perhaps a slightly different scenario.

I’m referencing the nhs uk analytics cookie script for testing as per the example repo of implementing adobe analytics. I've got everything working but there’s an error in the console where it seems to communicate whether you’ve seen the cookie banner (and then when you've accepted cookies) to nhs.uk.

Access to XMLHttpRequest at 'https://www.nhs.uk/our-policies/cookies-policy/?policy-action=seen' from origin 'https://localhost:5012' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

It makes sense as our app is not hosted on nhs.uk (and in my case above I'm just running locally). It would be nice to be able to supply a test url in window.NHSUK_SETTINGS as per some other settings or an alternative to turn this call off when not in production.

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