• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

blogger


コミットメタ情報

リビジョンf4e38c6a339a93ce1354c4e3a7cdf053f183fcef (tree)
日時2018-03-25 18:30:17
作者umorigu <umorigu@gmai...>
コミッターumorigu

ログメッセージ

BugTrack/2463 Output HTTP custom response headers

Config: $http_response_custom_headers in pukiwiki.ini.php

変更サマリ

差分

--- a/lib/html.php
+++ b/lib/html.php
@@ -606,8 +606,11 @@ function pkwk_headers_sent()
606606 // Output common HTTP headers
607607 function pkwk_common_headers()
608608 {
609+ global $http_response_custom_headers;
609610 if (! PKWK_OPTIMISE) pkwk_headers_sent();
610-
611+ foreach ($http_response_custom_headers as $header) {
612+ header($header);
613+ }
611614 if(defined('PKWK_ZLIB_LOADABLE_MODULE')) {
612615 $matches = array();
613616 if(ini_get('zlib.output_compression') &&
--- a/pukiwiki.ini.php
+++ b/pukiwiki.ini.php
@@ -340,6 +340,13 @@ $external_link_cushion = array(
340340 $html_meta_referrer_policy = '';
341341
342342 /////////////////////////////////////////////////
343+// Output custom HTTP response headers
344+$http_response_custom_headers = array(
345+ // 'Strict-Transport-Security: max-age=86400',
346+ // 'X-Content-Type-Options: nosniff',
347+);
348+
349+/////////////////////////////////////////////////
343350 // $whatsnew: Max number of RecentChanges
344351 $maxshow = 500;
345352