Revision | f4e38c6a339a93ce1354c4e3a7cdf053f183fcef (tree) |
---|---|
Time | 2018-03-25 18:30:17 |
Author | umorigu <umorigu@gmai...> |
Commiter | umorigu |
BugTrack/2463 Output HTTP custom response headers
Config: $http_response_custom_headers in pukiwiki.ini.php
@@ -606,8 +606,11 @@ function pkwk_headers_sent() | ||
606 | 606 | // Output common HTTP headers |
607 | 607 | function pkwk_common_headers() |
608 | 608 | { |
609 | + global $http_response_custom_headers; | |
609 | 610 | if (! PKWK_OPTIMISE) pkwk_headers_sent(); |
610 | - | |
611 | + foreach ($http_response_custom_headers as $header) { | |
612 | + header($header); | |
613 | + } | |
611 | 614 | if(defined('PKWK_ZLIB_LOADABLE_MODULE')) { |
612 | 615 | $matches = array(); |
613 | 616 | if(ini_get('zlib.output_compression') && |
@@ -340,6 +340,13 @@ $external_link_cushion = array( | ||
340 | 340 | $html_meta_referrer_policy = ''; |
341 | 341 | |
342 | 342 | ///////////////////////////////////////////////// |
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 | +///////////////////////////////////////////////// | |
343 | 350 | // $whatsnew: Max number of RecentChanges |
344 | 351 | $maxshow = 500; |
345 | 352 |