12
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
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
|
||||
Reference in New Issue
Block a user