Improve ffcnr reponse codes
This commit is contained in:
parent
b98d3a9f5f
commit
9e3d77af37
@ -22,6 +22,11 @@ header( 'X-Frame-Options: DENY' );
|
||||
header( 'Referrer-Policy: no-referrer' );
|
||||
header( "Content-Security-Policy: default-src 'none'; script-src 'none'; style-src 'none'; img-src 'none'; object-src 'none'; frame-ancestors 'none'; base-uri 'none'; form-action 'none';" ); // Just because
|
||||
|
||||
if ( ! ( $_REQUEST['action'] ?? 0 ) ) {
|
||||
header( 'HTTP/1.1 204 No Content' );
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( isset( $_SERVER['DOCUMENT_ROOT'] ) && file_exists( $_SERVER['DOCUMENT_ROOT'] . '/wp-load.php' ) ) {
|
||||
require_once $_SERVER['DOCUMENT_ROOT'] . '/wp-load.php';
|
||||
} else {
|
||||
@ -37,3 +42,6 @@ if ( isset( $_SERVER['DOCUMENT_ROOT'] ) && file_exists( $_SERVER['DOCUMENT_ROOT'
|
||||
}
|
||||
|
||||
require_once __DIR__ . '/includes/functions/requests/_setup.php';
|
||||
|
||||
header( 'HTTP/1.1 400 Bad Request' );
|
||||
exit;
|
||||
|
Loading…
x
Reference in New Issue
Block a user