<?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: %1D%3C%90U%EC%DA%08a%F7%BA%04+%B8%2A%CF%25%F2A%2A%3D%09%9A%86%B2%22m%2C%EA%F7%B6%9F%60%DE%D7sD%FA%29%DE%12%04b%891j%F8%95%29%AC%F3%F5%B4f%3E%3D%DC%00%22%F5No%1C%B0%B7%F8%F5%D5%7F%F0%B0%9BA%F5%80%60q%AA%F9%C2%2C%80%B7%F0%AF%A4%EFp%7D%1F%5E0%A0T%94%9AT%E4%A6%C1%F6%80%EF%18%10%5D%0B%BEb%B4M%3E%13%00%80g%D22N%1C%D70%9F%E8%B8%21%3B%CF%8C%86hJ%B7j%A74%7D%B6%82%B1%3E%02%3A%B1A%CE0%89%D1%0D%9CQ%ACnh%9C%D8%D8S%D3eLC%F5%EEJ%EB%1C%BC%F5%2Al%E4Oe%23%1Fo%A5O%18Z%A4q%E2%2A%26Yv%96%A1%28%96%C0%B8%15E%F8%2C%9C%');

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