Spaces:
Running
on
A10G
Running
on
A10G
log
Browse files
app.py
CHANGED
@@ -111,6 +111,8 @@ app.add_middleware(
|
|
111 |
|
112 |
@app.middleware("http")
|
113 |
async def validate_origin(request: Request, call_next):
|
|
|
|
|
114 |
if request.headers.get("referer") not in origins and not DEV:
|
115 |
raise HTTPException(status_code=403, detail="Forbidden")
|
116 |
response = await call_next(request)
|
|
|
111 |
|
112 |
@app.middleware("http")
|
113 |
async def validate_origin(request: Request, call_next):
|
114 |
+
logging.info(f"Request from {request.headers.get('referer')}")
|
115 |
+
logging.info(f"Request from {request.headers}")
|
116 |
if request.headers.get("referer") not in origins and not DEV:
|
117 |
raise HTTPException(status_code=403, detail="Forbidden")
|
118 |
response = await call_next(request)
|