Dec 12

Just create an .htaccess file and add the HSTS header app-root/repo/php.

# 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"

转自:http://stackoverflow.com/questions/31878496/http-strict-transport-security-on-openshift

Leave a Reply