
內容簡介
此外掛為您的網站自動加上 SSL 安全性所需的標頭。想要了解更多關於此功能及其重要性的資訊,請瀏覽:http://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security。
選項預設允許瀏覽器預載 HSTS 指令,但你可以透過過濾器來設定,詳情已寫在程式碼中。
你發現這個外掛有幫助嗎?請考慮撰寫評論。
若要更新 max-age 設定,請在 functions.php 中加入以下程式碼
add_filter('lh_hsts_max_age', 'modify_ls_hsts_max_age_func');
function modify_ls_hsts_max_age_func( $max_age ){
return false;
}
`
若要更新子網域設定,請在 functions.php 中加入以下程式碼
add_filter(‘lh_hsts_subdomain’, ‘modify_ls_hsts_subdomain_func’);
function modify_ls_hsts_subdomain_func( $subdomain ){
return false;
}
`
若要更新預載設定,請在 functions.php 中加入以下程式碼
add_filter('lh_hsts_preload', 'modify_ls_hsts_preload_func');
function modify_ls_hsts_preload_func( $preload ){
return false;
}
`
若要更新重新導向設定,請在 functions.php 中加入以下程式碼
add_filter(‘lh_hsts_redirect’, ‘modify_ls_hsts_redirect_func’);
function modify_ls_hsts_redirect_func( $redirect ){
return false;
}
`
外掛標籤
開發者團隊
原文外掛簡介
This plugin send the proper headers for full ssl security. For more information on what this is and why it is important visit: http://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security
The options are preset to enable browsers to preload the HSTS directive but can be overwritten by filters which are clearly documented in the code.
Did you find this plugin helpful? Please consider writing a review.
To update the max-age settings, add the following code to your functions.php
add_filter('lh_hsts_max_age', 'modify_ls_hsts_max_age_func');
function modify_ls_hsts_max_age_func( $max_age ){
return false;
}
`
To update the subdomain settings, add the following code to your functions.php
add_filter(‘lh_hsts_subdomain’, ‘modify_ls_hsts_subdomain_func’);
function modify_ls_hsts_subdomain_func( $subdomain ){
return false;
}
`
To update the preload setting, add the following code to your functions.php
add_filter('lh_hsts_preload', 'modify_ls_hsts_preload_func');
function modify_ls_hsts_preload_func( $preload ){
return false;
}
`
To update the redirect setting, add the following code to your functions.php
add_filter(‘lh_hsts_redirect’, ‘modify_ls_hsts_redirect_func’);
function modify_ls_hsts_redirect_func( $redirect ){
return false;
}
`
