Disable legacy HTTP image hooks by default
This commit is contained in:
1 parent
f04b81c606
commit
87cc2977d5
5 files changed
+36
-2
No files matched your search
@@ -2,6 +2,15 @@
|
||||
|
||||
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 hook disabled',
|
||||
]));
|
||||
}
|
||||
|
||||
include(__DIR__.'/gogs_key.php');
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user