Spaces:
Runtime error
Runtime error
krunakuamar
commited on
Commit
•
aa72559
1
Parent(s):
ae07b63
Update app.py
Browse files
app.py
CHANGED
@@ -174,6 +174,9 @@ async def process_mask(idx, mask_i, boxes, probs, yolo_model, blank_image, cls):
|
|
174 |
|
175 |
@app.middleware("http")
|
176 |
async def check_auth_header(request: Request, call_next):
|
|
|
|
|
|
|
177 |
token = request.headers.get('Authorization')
|
178 |
if token != os.environ.get("SECRET"):
|
179 |
return JSONResponse(content={'error': 'Authorization header missing or incorrect.'}, status_code=403)
|
|
|
174 |
|
175 |
@app.middleware("http")
|
176 |
async def check_auth_header(request: Request, call_next):
|
177 |
+
logger.info(f"final forward pad size: {request.headers.get('Authorization')}")
|
178 |
+
logger.info(f"final forward pad size: {os.environ.get("SECRET")}")
|
179 |
+
|
180 |
token = request.headers.get('Authorization')
|
181 |
if token != os.environ.get("SECRET"):
|
182 |
return JSONResponse(content={'error': 'Authorization header missing or incorrect.'}, status_code=403)
|