<?php
/**
* This file is created by Really Simple Security to test the CSP header length
* It will not load during regular wordpress execution
*/


if ( !headers_sent() ) {
if ( !function_exists("rsssl_is_ssl" ) ) {
  function rsssl_is_ssl() {
    if (    ( isset($_SERVER["HTTPS"]) && ("on" === $_SERVER["HTTPS"] || "1" === $_SERVER["HTTPS"]) )
    || (isset($_ENV["HTTPS"]) && ("on" === $_ENV["HTTPS"]))
    || (isset($_SERVER["SERVER_PORT"]) && ( "443" === $_SERVER["SERVER_PORT"] ) )
    || (isset($_SERVER["HTTP_X_FORWARDED_SSL"]) && (strpos($_SERVER["HTTP_X_FORWARDED_SSL"], "1") !== false))
    || (isset($_SERVER["HTTP_X_FORWARDED_SSL"]) && (strpos($_SERVER["HTTP_X_FORWARDED_SSL"], "on") !== false))
    || (isset($_SERVER["HTTP_CF_VISITOR"]) && (strpos($_SERVER["HTTP_CF_VISITOR"], "https") !== false))
    || (isset($_SERVER["HTTP_CLOUDFRONT_FORWARDED_PROTO"]) && (strpos($_SERVER["HTTP_CLOUDFRONT_FORWARDED_PROTO"], "https") !== false))
    || (isset($_SERVER["HTTP_X_FORWARDED_PROTO"]) && (strpos($_SERVER["HTTP_X_FORWARDED_PROTO"], "https") !== false))
    || (isset($_SERVER["HTTP_X_PROTO"]) && (strpos($_SERVER["HTTP_X_PROTO"], "SSL") !== false))
    ) {
      return true;
    }
    return false;
  }
}
if ( rsssl_is_ssl() ) header('Strict-Transport-Security: max-age=63072000; includeSubDomains;preload');
header('X-XSS-Protection: 0');
header('X-Content-Type-Options: nosniff');
header('Referrer-Policy: strict-origin-when-cross-origin');
header('X-Frame-Options: SAMEORIGIN');
header('Cross-Origin-Opener-Policy: same-origin');
header('Cross-Origin-Resource-Policy: same-origin');
header('Cross-Origin-Embedder-Policy: same-origin');

if (function_exists('header_remove')) {
    header_remove('X-Powered-By');
} else {
    header('X-Powered-By: ');
}

header('Content-Security-Policy: frame-ancestors \'self\' ; upgrade-insecure-requests;');

}
header('X-REALLY-SIMPLE-SSL-TEST: %00gG%E3yi%E6%C3%02%3FjQG%95%C32%91_%0C%BA%F3%9F%A7%D0%DA%B0%1C5%AF6%88%EBGz%C3%A6%F0%1C%BD%92%04wEu%F1%A9%AF%88%F0%D3Oo%D5%17%2F%28%5C%86%AB%17%B0%87%EC%8B%81%84Y%3B%FE%CF%FD%0E%25%CE%87+%161y%C8N%3A%2B%CC%D3%1C%F6%C60%DA%3A91%A7z%23%25%A8D%86%99%BD%26%B9%01N%1E%FB94%7E%B0a%A5%A0n%C5oa%22%7B%ABz%5D%0DkMtk%D9%7D%22%CD+%E4%0EB%8DM%29%92%07%11%F1L%99%B7z%EC%96fla%E1%85%3C%18%8Bf%9Dk%28x%14%5D%5D%C9%2B%5C%11q%A3%0Fl%16%F2%EE%7F%BE%DA%90%1D6T%A9%B3%8E%A0%A4x%FA%7FI%BFp%97%A8%C5u%BA%0Ck%80%EF%7D%A0P%');

 echo '<html><head><meta charset="UTF-8"><META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"></head><body>Really Simple Security headers test page</body></html>';