-
Notifications
You must be signed in to change notification settings - Fork 28
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
Script Manager Output Caching #291
Comments
Hi @whitter Thanks for the report, though I am not sure if removing the cache would fix your issue here. I think only the output of the scripts are cached, not the whole view. So if you are overwriting the But those are just my initial thoughts, I'll try to reproduce this myself and see if I can find a fix for it :) |
Hi @patrickdemooij9, Just calling in to see if you had a chance to reproduce the above and see if you need anymore information. |
Hi @whitter Thank you for the report! |
Hi @whitter
|
The current caching of the Script Manager view output is causing issues when mixed with CSP Manager.
So for instance when wanting to apply CSP nonce for Google Tag Manger we would create a custom view to override the default GTM
HeadBottom.cshtml
view from Script Manager to added the extra bit of JS to configure the nonce.When using CSP Manager this nonce creation is handled with a tag helper so when end up with a view template like this:
CSP Manager will then keep track of the creation of nonce on the
HttpContext
and its middleware will output the CSP response headers based on the state of the data in the context. With the caching of the view output in Script Manager, subsequent request do not create the context data that CSP Manager expects and no nonce is output in the CSP header.Based on my understanding of the Script Manager code the caching could be removed (or toggled on/off with a setting) with no detrimental affect.
The text was updated successfully, but these errors were encountered: