Modernizr Causes Content Security Policy (CSP) Violation Errors

前端 未结 2 1837
一个人的身影
一个人的身影 2020-12-25 11:11

I am attempting to use the new Content Security Policy (CSP) HTTP headers on a test site. When I use CSP in conjunction with Modernizr I get CSP violation e

2条回答
  •  一向
    一向 (楼主)
    2020-12-25 11:41

    I suspect there's no other solution than to rewrite the parts of Modernizr that use inline code or dynamically evaluated code (which applies to both JS and CSS). The experiences of AngularJS ngCsp might be useful here.

提交回复
热议问题