api.conf: 修改拒绝时的错误码,使其更有意义

This commit is contained in:
Tian Yunhao 2019-05-18 15:00:43 +08:00 committed by GitHub
parent ebdb1b15c9
commit d83313c64e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,8 +1,8 @@
if ($_origin_id = '') {
return 404 'ERROR: origin `$http_origin` is not allowed';
return 403 'ERROR: origin `$http_origin` is not allowed';
}
if ($http_x_jsproxy) {
return 404 'ERROR: circular dependency';
return 500 'ERROR: circular dependency';
}
proxy_set_header x-jsproxy 1;
proxy_set_header Connection $http_connection;
@ -67,4 +67,4 @@ location = /traff {
'access-control-allow-origin: *'
'cache-control: no-cache'
;
}
}