Image refused to load due to content security policy violation

0

Hello, I uploaded web files provided by our customer to be hosted by an S3 bucket and once I used the URL to display everything worked except one image that could not be loaded and the error message is:"Refused to frame 'https://xxxxxxx.com' becaused it violates the following content security policy directive: "frame-src 'self'. https://xxxxxxx.com

How can I fix it in I guess lambda edge function? We used cloudformation templates.

I am a cloud engineer but do not know much about web stuff.

Many thanks for your help in advance. Del

Abdel
已提問 1 年前檢視次數 1294 次
1 個回答
0

Your request is violating Content security policy directive as you've mentioned it as ""frame-src 'self'". If you have index.html file, please change the meta tag as shown in the below link. For example you can modify it to - <meta http-equiv="Content-Security-Policy" content="script-src 'self' http://localhost:5000 'unsafe-inline' 'unsafe-eval';">

Link - https://stackoverflow.com/questions/31211359/refused-to-load-the-script-because-it-violates-the-following-content-security-po

AWS
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南