Content Security Policy: The page's settings blocked the loading of a resource

前端 未结 6 616
梦毁少年i
梦毁少年i 2020-11-30 01:44

I am using CAPTCHA on page load, but it is blocking because of some security reason.

I am facing this problem:

    Content Security Policy: The page\'s sett         


        
6条回答
  •  隐瞒了意图╮
    2020-11-30 01:57

    I had a similar error type. First, I tried to add the meta tags in the code, but it didn't work.

    I found out that on the nginx web server you may have a security setting that may block external code to run:

    # Security directives
    server_tokens off;
    add_header X-Frame-Options SAMEORIGIN;
    add_header X-Content-Type-Options nosniff;
    add_header X-XSS-Protection "1; mode=block";
    add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'  https://ajax.googleapis.com  https://ssl.google-analytics.com https://assets.zendesk.com https://connect.facebook.net; img-src 'self' https://ssl.google-analytics.com https://s-static.ak.facebook.com https://assets.zendesk.com; style-src 'self' 'unsafe-inline' https://assets.zendesk.com; font-src 'self' https://fonts.gstatic.com  https://themes.googleusercontent.com; frame-src https://player.vimeo.com https://assets.zendesk.com https://www.facebook.com https://s-static.ak.facebook.com https://tautt.zendesk.com; object-src 'none'";
    

    Check the Content-Security-Policy. You may need to add the source reference.

提交回复
热议问题