R.W*_*R.W 4 security https http-headers openshift
如何在openshift门户上启用HTTP严格传输安全性?我正在开发一个php应用程序,不太确定在何处进行此设置.我相信我需要访问Apache配置文件来实现这一点 - 我不认为openshift允许.
只需创建一个.htaccess文件并在那里添加HSTS标头.
# 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"
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
699 次 |
| 最近记录: |