This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Module#run methods are run before ng-csp takes effect #2963
Closed
Description
Right now if I have a module.run() that triggers the getterFn logic inside of Angular it is occuring before the ng-csp directive can take effect. So the Function constructor function is returned and used, and the initialization stops form the CSP error.
I'm able to work around this for now by adding another module.run method prior that has the $sniffer injected and sets $sniffer.csp to true.
It would be great if the module.run methods were invoked after ng-csp took effect. Alternatively it seems like it would be better to inject the $snifferProvider into the module config and be able to tell it to turn on CSP.
Is there a suggested direction for how you would want to solve this?
Metadata
Metadata
Assignees
Labels
No labels