Reputation: 449
when I use ng serve in angular cli to serve my angular app everything is OK, my files: polyfill.js, styles.js, favicon.ico are served over http. However, when I do ng build --prod and serve that files over some http server, polyfill.js, styles.js, favicon.ico are requested over https, and since this is local server without https, loading fails. I am using Angular: 11.0.4. I have similar project built two years ago with I think angular 9, and I am using the same http server, just on different machine, and it is working as expected (no https). What is the problem here?
Upvotes: 0
Views: 597
Reputation: 449
It was Content-Security-Policy header that forced https...realize this when I tried simple http-server form npm...
Upvotes: 0