devopsroad
devopsroad

Reputation: 19

Apache and AWS HTTP to HTTPS Header Issue

I am using AWS Cloudfront and AWS Loadbalancer to serve our website. The LB redirects to traffic coming from HTTP to HTTPS. On Cloudfront you can add HEADERS and I added both apache2 config file and cloudfront security headers sections.

Now, when I check MAIN PAGE File via browser inspect I see 301 and 302 response and it does not response my headers. In contrast, when I click the javascript or css files it calls during download page, I can see my response header which I added both server and cloudfront.

How can I see my response headers on my main website page

x-content-type-options: nosniff x-frame-options: SAMEORIGIN x-xss-protection: 1; mode=block Strict-Transport-Security: max-age=; includeSubDomains

Upvotes: 1

Views: 200

Answers (1)

devopsroad
devopsroad

Reputation: 19

it is working right now. I can not solve the problem with cloudfront and elb, I manually wrote header set on .htaccess file for apache2. it is not good way to every request will be checked by htaccess file but this works.

Upvotes: 0

Related Questions