Disable legacy HTTP image hooks by default
This commit is contained in:
+8
-1
@@ -2,6 +2,13 @@
|
||||
namespace sammo\img_service;
|
||||
|
||||
header('Content-Type: application/json');
|
||||
if (!file_exists(__DIR__.'/legacy-enabled')) {
|
||||
http_response_code(410);
|
||||
die(json_encode([
|
||||
'result'=>false,
|
||||
'reason'=>'legacy key installation disabled',
|
||||
]));
|
||||
}
|
||||
|
||||
|
||||
$json_response = [
|
||||
@@ -33,4 +40,4 @@ file_put_contents(__DIR__.'/HashKey.php', $keyFile);
|
||||
|
||||
$json_response['result'] = true;
|
||||
$json_response['reason'] = 'success';
|
||||
die(json_encode($json_response));
|
||||
die(json_encode($json_response));
|
||||
|
||||
Reference in New Issue
Block a user