Junaidb commited on
Commit
faa9164
·
verified ·
1 Parent(s): 52bec60

Update components/middleware.py

Browse files
Files changed (1) hide show
  1. components/middleware.py +1 -12
components/middleware.py CHANGED
@@ -204,17 +204,6 @@ class x401Kit(BaseHTTPMiddleware):
204
 
205
 
206
  REQUIRED_SERVICE=None
207
-
208
-
209
- #for protected_path,service_name in self.protected_paths.items():
210
- #for protected_path in protected_paths:
211
-
212
- #if request.url.path.startswith(protected_path):
213
-
214
- #REQUIRED_SERVICE = service_name
215
- #break
216
-
217
-
218
 
219
  if not X_401_Addr and not X_401_Nonce and not X_401_Sign :
220
 
@@ -255,7 +244,7 @@ class x401Kit(BaseHTTPMiddleware):
255
  if country["data"] is None:
256
  return JSONResponse(
257
 
258
- content={"status": "error", "message": f"Auth error"},
259
  headers= {
260
  "Access-Control-Allow-Origin": "*",
261
  "Access-Control-Allow-Credentials": "true"
 
204
 
205
 
206
  REQUIRED_SERVICE=None
 
 
 
 
 
 
 
 
 
 
 
207
 
208
  if not X_401_Addr and not X_401_Nonce and not X_401_Sign :
209
 
 
244
  if country["data"] is None:
245
  return JSONResponse(
246
 
247
+ content={"status": "locerror", "message": f"Auth error"},
248
  headers= {
249
  "Access-Control-Allow-Origin": "*",
250
  "Access-Control-Allow-Credentials": "true"