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?

asked a year ago216 views
1 Answer
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

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions