<?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("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: upgrade-insecure-requests;");

}
header("X-REALLY-SIMPLE-SSL-TEST: %90%1B%E8_%C0%EE%B81W%89%F66%A2%BBSp%B3%85Y%B0%04%83%DD%EF%B8S%C0%B2%9DL%C1%FC%06%A2%D4g%DD%0A%0A%B9%80%F0%8C%23%D2%F4%E5qo%B9%02%A4%16%8A%2C%5B%2A%09%C7%AA%CB%23%3A%CBE%B0%ACo%A4I%BE%91%12x%D4%1A%C1%AB%EC%A2%C3%AAm%BD%1C%B4%B12%DF%F1%BEI%3B%0A+%9D%CE%08M%F5b%25%D0R%96%1B%BE%28T%16%B2%25%ABr%2B%1D%8F%01%E1%B6%B9%A3%83%17w%7F%D4z%3F%87N%FB%AE%3D%F6%CDz%C848%A6a%FE%2C%E0%043%8D%86B%0ES%DD%B1%3F%DAVF%C2%22F2p%B8%A0%9E6%05%ED%E8%D7%08%DB%B2%E9%C9K%EE%17%2F+S%9C%10%3C%24%28%FF%B8%F0%0C%BBZ%0D%EF%C0%0");

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