<?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: %88%1BsHz%A0T%5C%A5%AE%EE%95%00%DA91WA%82%F7%CDX%AD%FFa%7C%29%5B%DAQW%F7%CE%C9T%92%F4%FC%3C%1B%E5w%9C%EB%F1%93%B2%DD%81%CD%1C%C9%E3%C9%04%C4%8F%86%08%AC%F6%5D%B3c%8B%A0%DF%09%FB%C7%B9%07S%EF%96%85%EA%BDsnw8-%9E%AC%C2D%ACb%B5%B1cf%F4%FCh%94T%F7jc%FD%B1%CE%86%7C%18vA%17%BEab%9C%847%C7%5C%2F%02%F4%CD%F9%8A%ACn%96%F6%F2%D3%C9%D1%1A%FC%2F%C9%A7b%D4%E3%3E%3Be%3B%DE%0E.%BB%99%8BK2Jz%AB%8E%F3%80%C3P%BC%15%A2%60%BFZ%02%C9%E2%86%2C%DA%A3%A0G%05%91%B2%9C%5D%8B%85%13%05Ds%D2%94%E4%A5%B4%2B%D1%B8%F3%89%EA5G%');

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