Files

17 lines
347 B
Python
Raw Permalink Normal View History

2026-09-19 15:00:19 +08:00
from fastapi import Response
from datetime import datetime
async def m1(req,next):
if req.client.host in ['192.168.5.14','192.168.5.17','127.0.0.1']:
return Response(content='gun')
r=await next(req)
return r
async def m2(req,next):
a=datetime.now()
r=await next(req)
b=datetime.now()
print(b-a)
return r