Bladeren bron

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

Tian Yunhao 6 jaren geleden
bovenliggende
commit
d83313c64e
1 gewijzigde bestanden met toevoegingen van 3 en 3 verwijderingen
  1. 3 3
      api.conf

+ 3 - 3
api.conf

@@ -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'
   ;
-}
+}