Home  >  Q&A  >  body text

javascript - Security Policy directive: "default-src 'none'" appears in the github online preview of the vue project

The vue project runs with no problem, and the index.html after the build meeting can be opened directly without any problem.
However, the dist folder, after pushing to github, will be previewed online
http://htmlpreview.github. io/... Something went wrong during online preview. The page will appear for a moment when it is started, and then it will hang.

The reason for the error (because CSP does not know how to solve it, adding mg-src * will not work), is it because I applied the icon font

Page situation

The following is the dist folder of my github. Please help me solve it. I haven’t figured it out for a day. . .

https://github.com/Master-H/v...

世界只因有你世界只因有你2711 days ago1086

reply all(2)I'll reply

  • 迷茫

    迷茫2017-05-19 10:12:45

    I don’t know how to solve it, upgrade your website to https?

    http://m.blog.csdn.net/articl...

    reply
    0
  • PHP中文网

    PHP中文网2017-05-19 10:12:45

    Because this is the previewed content of your index file, github will put the file content in text format into the <pre> tag

    If your webpage appears when you browse, it is abnormal. Do you expect github to help you set up a website for free? . .

    Set up your own server to mount your project.

    reply
    0
  • Cancelreply