@@ -317,12 +317,6 @@ async def compare_tokens():
317
317
# raise NotAuthorized(message="Route Not Allowed, if you think this maybe an error please contact admin")
318
318
response = JSONResponse (content = "Request Does not Match Any Known Route" , status_code = 404 )
319
319
320
- # This code will be executed for each outgoing response
321
- # before it is sent back to the client.
322
- # You can modify the response here, or perform any other
323
- # post-processing that you need.
324
- # _out_signature = await cf_firewall.create_signature(response=response, secret=_secret)
325
- # response.headers.update({'X-Signature': _out_signature})
326
320
end_time = time .monotonic ()
327
321
app_logger .info (f"Elapsed Time Validate Request : { end_time - start_time } " )
328
322
app_logger .info ("Cleared Request Validation" )
@@ -464,10 +458,8 @@ async def v1_gateway(request: Request, path: str):
464
458
try :
465
459
# 5 minutes timeout on resource fetching from backend - some resources may take very long
466
460
response = await requester (api_url = api_url , timeout = 9600 )
467
-
468
461
if response and response .get ("status" , False ) and response .get ('payload' ):
469
462
# NOTE, Cache is being set to a ttl of one hour here
470
-
471
463
await redis_cache .set (key = api_url , value = response , ttl = 60 * 60 )
472
464
return JSONResponse (content = response , status_code = 200 , headers = {"Content-Type" : "application/json" })
473
465
except httpx .HTTPError as http_err :
0 commit comments