feat: 외부 호출이 불가능한 API 타입 정의
This commit is contained in:
@@ -53,6 +53,9 @@ class APIHelper
|
||||
|
||||
try {
|
||||
$obj = buildAPIExecutorClass($actionPath, $rootPath, $actionArgs);
|
||||
if(!$obj::$allowExternalAPI){
|
||||
Json::dieWithReason('외부에서는 호출할 수 없습니다.');
|
||||
}
|
||||
$validateResult = $obj->validateArgs();
|
||||
if ($validateResult !== null) {
|
||||
$logDB->insert('api_log', [
|
||||
|
||||
@@ -11,6 +11,7 @@ abstract class BaseAPI
|
||||
const REQ_READ_ONLY = 4;
|
||||
|
||||
static array $sensitiveArgs = [];
|
||||
static bool $allowExternalAPI = true;
|
||||
|
||||
public function getFilteredArgs(): array {
|
||||
$filteredArgs = $this->args;
|
||||
|
||||
Reference in New Issue
Block a user