If you’re seeing that “allow-scripts + allow-same-origin” warning but you have no <iframe> in your HTML, it almost certainly means you’re sending a CSP Sandbox directive from PHP. Chrome treats that exactly like an iframe sandbox and warns you when both flags are present.
—
1) Find where you’re setting the CSP sandbox header
Search your code for something like:
header("Content-Security-Policy: sandbox allow-scripts allow-same-origin");
or if you’re using a framework or library (e.g. some middleware or a shared include), dig there.
—
2) Decide which sandbox behavior you really need
• If you want to run scripts but still isolate the page’s origin (no cookies, no parent-window access):
header("Content-Security-Policy: sandbox allow-scripts");
• If you want to preserve origin (cookies, storage) but block all scripts:
header("Content-Security-Policy: sandbox allow-same-origin");
• If you don’t need sandboxing at all, just remove the sandbox directive (or stop sending that header).
—
3) Example in plain PHP
At the very top of your PHP entry-point (before any output):
<?php
// Only allow scripts, keep the origin opaque:
header("Content-Security-Policy: sandbox allow-scripts");
// … the rest of your PHP-generated page follows
?>
<!doctype html>
<html lang="en">
<head> … </head>
<body> … </body>
</html>
If you instead need same-origin but no JS, swap in:
header("Content-Security-Policy: sandbox allow-same-origin");
Once you drop one of those two flags, Chrome will stop warning that your “sandbox” is effectively disabled.