mirror of https://github.com/tiangolo/fastapi.git
🎨 [pre-commit.ci] Auto format from pre-commit.com hooks
This commit is contained in:
parent
7d7224bafc
commit
ef75891358
|
|
@ -2,7 +2,8 @@ import functools
|
|||
import http.cookies
|
||||
import secrets
|
||||
from re import Pattern
|
||||
from typing import Dict, List, Optional, Set, Any
|
||||
from typing import Any, Dict, List, Optional, Set
|
||||
|
||||
from itsdangerous import BadSignature
|
||||
from itsdangerous.url_safe import URLSafeSerializer
|
||||
from starlette.datastructures import URL, MutableHeaders
|
||||
|
|
@ -152,8 +153,9 @@ class CSRFMiddleware:
|
|||
)
|
||||
|
||||
def _receive_with_body(self, receive, body) -> dict:
|
||||
async def inner() -> dict :
|
||||
async def inner() -> dict:
|
||||
return {"type": "http.request", "body": body, "more_body": False}
|
||||
|
||||
return inner
|
||||
|
||||
|
||||
|
|
@ -169,4 +171,5 @@ def csrf_token_processor(csrf_cookie_name: str, csrf_header_name: str):
|
|||
"csrf_input": csrf_input,
|
||||
"csrf_header": csrf_header,
|
||||
}
|
||||
return processor
|
||||
|
||||
return processor
|
||||
|
|
|
|||
Loading…
Reference in New Issue