Loading...

在PHP裡添加HTTP Strict Transport Security

Temperature: 0 °C

Mark ChangMark Chang
author_tools

要通過 PHP 啟用 HTTP 嚴格傳輸安全,請使用以下設定。

<?php
//告訴瀏覽器站點只能通過https加載
header("Strict-Transport-Security:max-age=31536000");
?>

max-age 的設定值以秒為單位。

這裡使用 31536000 為12 個月。

#故事  #php  #HTTP Strict Transport Security  #maxage  
https://innstory.com/story-在PHP裡添加HTTP_Strict_Transport_Security-2761
PHP

Prev
 直接在PHP重新命名帶有前綴的sessionname

Next
41是一個甚麼數字啊 

About the Author

Mark Chang

離不開電腦的宅男

Visitor message

Leave some footprints to prove that you visited me

Recommended reading

Author's other related stories

直接在PHP重新命名帶有前綴的session.name

直接在PHP重新命名帶有前綴...

直接在php檔案裡加入以下指令 sessionname(&#;SecurePHPSESSID&#;)...

刪除已上傳至server的檔案

刪除已上傳至server的檔...

a5 管理系統,難免都會遇到要更新或刪除已經上傳到server的檔案。 總不能只是重新上傳卻又不把舊...

WordPress如何關閉迴響留言功能?

WordPress如何關閉迴...

其實WordPress本身的留言迴響功能還蠻健全的。 包括可以設定關鍵字黑名單或者是IP黑名單,強制...

Please select an option

error

Hi, thank you for your participation, but you cannot vote repeatedly~

Join innstory now and start recording your story.

"Innstory" is a place to store stories. We are committed to becoming a warm platform. Deepening the bonds between people is our direction.
We are convinced that the blockchain between people is not just a cold calculation. Join us now.

Wrong format