I have Java-based based web application running on Tomcat 6. My application is running on localhost and port 9001.
To make my application more secure and to reduce the risk of XSS attacks, I added the header Content-Security-Policy
with value default-src * 'unsafe-inline' 'unsafe-eval';script-src 'self'. With this I want to allow the web application to load the JavaScript files from same domain.
For other resources it continues to load in the same fashion as it was without this header.
But I am getting the below error.
Content Security Policy: The page's settings blocked the loading of a resource at self ("script-src http://localhost:9001").