Strict HTTP transport security on open
How to enable HTTP Strict Transport Security in openshift portal? I am working on a php application and am not really sure where to go. I believe I need access to the Apache config file to achieve this - which I don't think lets go down.
+3
MM
source
to share
1 answer
Just create a file .htaccess
and add the HSTS header there.
# Force https
RewriteEngine on
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
# Add HSTS header
Header set Strict-Transport-Security "max-age=31536000"
+5
luciddreamz
source
to share