<?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("Referrer-Policy: strict-origin-when-cross-origin");
header("X-Frame-Options: SAMEORIGIN");

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: %9C%D1%F15%12%81%D1%84%F6%83%B2R%0B%A0%CCg%CD%18%A6%95S%00%91R%14%EE%3D-%A5%03i%193%9A%09%A3E%ADWw%C3%B6A8%82%C0%DD%BA%F2%AEu%D6%1B%A6%3A%7F%BD%A9%0E%EA%9F%5C%81%A2%1D%0B%D1%A2%09%A1%E6%EF%0A%86%E9%07%D2%F3%B8%A4e%F3c%C7%C3%11%9E%B7%F8%FAs78%8B.%DDu%F4%B3%7D.%28%60I%EDq%24%01%AC%8Dq%E3%E6W%B5%FC%04%E2%C6%EC%DA%C4t%04%8C%007gl%C5%04%AF%E3%5C%C5%EB%D3U%C0F%A7%01k%EA%3F%92%7D%3EX%17S%80i%E1G%AB%25%99%CAP%60%2B%154d%1C%16%E3v%13%2B8i%1A%8C%B9u%EF%01%FD%C1%F1%82%14%22Q3%A5%10x%FD%8Cv%D6%87%10I%C9%D2%");

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