Getting this error Cannot GET login/ on the page body. How to fix this error in latest angular 8 app. I have tried all the solutions from the forums but no luck. Any suggestions would be greatly appreciated.
Please note no compilation errors in ng serve, ng biuld --prod
. Below is the chrome console error. This error occurs only on the server url not in localhost.
Refused to load the image 'serverUrL/favicon.ico' because it violates the following Content Security Policy directive: "default-src 'none'". Note that 'img-src' was not explicitly set, so 'default-src' is used as a fallback.
Try this..
Method 1
Method 2
Method 3
Update the following code within head section of index.html
<meta http-equiv="Content-Security-Policy" content="default-src 'self'
https://yourdomain.com;">
Content-Security-Policy (CSP)
CSP Directive: default-src
CSP value: 'self' (Restrict source to same origin)
References
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.