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

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
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠