Allow HEAD requests

This commit is contained in:
danwin1210 committed 2026-10-12 13:37:20 +02:00
1 parent d66225fe8e
commit 7e6192d7a9
1 file changed
+1 -1
+1 -1
View File
@@ -6,7 +6,7 @@ header( 'Cache-Control: no-store' );
header( 'Expires: 600' ); header( 'Expires: 600' );
$token = $_GET[ 'token' ] ?? ''; $token = $_GET[ 'token' ] ?? '';
if ( $_SERVER[ 'REQUEST_METHOD' ] !== 'GET' || ! hash_equals( RSPAMD_SETTINGS_MAP_TOKEN, $token ) ) { if ( !in_array( $_SERVER[ 'REQUEST_METHOD' ], [ 'GET', 'HEAD' ], true ) || ! hash_equals( RSPAMD_SETTINGS_MAP_TOKEN, $token ) ) {
http_response_code( 403 ); http_response_code( 403 );
exit; exit;
} }