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取得目前網址方式

使用PHP取得目前網址方式

pexelsphoto55 使用PHP取得網址相關的方式有下列幾種: $SERVER["R...

PHP輸出到WORD跟EXCEL 簡易做法

PHP輸出到WORD跟EXC...

pexelsphotooffice WORD: $filename="test.doc&q...

javascript如何通過其 ID 設置選擇元素的選定選項?

javascript如何通過...

如題,透過javascript來針對某個select的option來做選定。 document.ge...

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