CSS file blocked: MIME type mismatch (X-Content-Type-Options: nosniff)

后端 未结 9 2099
失恋的感觉
失恋的感觉 2020-12-08 13:21

I am developing an Angular 4 app and I want to apply some global styles. Following the tutorial at the angular site, I\'ve created a \"styles.css\" file in the root directo

9条回答
  •  一向
    一向 (楼主)
    2020-12-08 13:52

    A simple hack is to add a forward slash / before the the path to the stylesheet used. For me it was href='css/style.css', changed it to href='/css/style.css'. Worked like a charm.

提交回复
热议问题