<?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;");
header("X-XSS-Protection: 0");
header("X-Content-Type-Options: nosniff");
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: %18%2C%C1RHh%9D%AF%15%23%D1u%D9%94%26%A7%E7%AC7%24%A5%DFn%B98%DA%A1%C4%3F5%AC%B6%D9%80%C6M%A6%B1%FD%3BY%0E%22%01%F9X%DB%9C%18%ACOA%8D%05%A0%D4gZU%AAd%D1%3D%87%DD%C7%F0%D9%7B%BC%60aFy%C3FN%C4%01+%F4%7DK%2C%9F%87%AEge%FE%95%1D%24%F94%3Dv%0A%8Ch%07_%26%AA.q%C2%B9%2F9%F5.i%D2%7B%EFiu_%9C%AFj%E7%82i%E2N%FA%EE%ABts%A1x%80j%1B%D1%B0+%8D%E9%C7%1B%19s%5D%0D%93%C5%B0%C0%17%7ET%9EJ%2C%0C%AC%90%2FE%11%97%AB0%CDi%99%9D%BB%B41e%3F%19%EEp5f%AD3%0C%97d%15W%97G%CEr%C3n%95%23%81%1F%8A%B2%90%01%27%F6%91%BB%F0%8C%C");

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