Setting up content Security policy Header for base 64 file in website

0

I want to setting up content Security policy Header for base 64 file in my website. Can i use CloudFront to set up the content Security policy Header for base 64 file ?

My website is hosted in EC2 with load balancer

  • Are you hosting the website in S3?

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

Since you are hosting site on EC2, You can set any headers you want.

But if you are asking, can you setup custom headers on CloudFront response? the answer is yes you can setup a static header "Content-Security-Policy". But if you want to change the headers dynamically you would need to use your web server or application on EC2 to generate that.

https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/understanding-response-headers-policies.html#understanding-response-headers-policies-custom

已回答 1 年前

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

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

回答問題指南