Skip to content

Commit

Permalink
Merge pull request #366 from nanasess/fix-api
Browse files Browse the repository at this point in the history
API機能が無効の場合は 403 Forbidden を返すよう修正
  • Loading branch information
chihiro-adachi committed Jan 21, 2020
2 parents 6c237cc + 7eeb469 commit a164798
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions data/class/api/SC_Api_Operation.php
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,10 @@ protected function getOperationRequestEcho($arrParam, $start_time)
*/
public function sendApiResponse($type, $response_outer_name, &$arrResponse)
{
if (API_ENABLE_FLAG == false) {
http_response_code(403);
return;
}
switch ($type) {
case 'xml':
SC_Api_Utils_Ex::sendResponseXml($response_outer_name, $arrResponse);
Expand Down

0 comments on commit a164798

Please sign in to comment.