MCPcopy
hub / github.com/fastapi/fastapi / require_cookie

Function require_cookie

tests/test_frontend.py:273–276  ·  view source on GitHub ↗
(request: Request)

Source from the content-addressed store, hash-verified

271 calls: list[str] = []
272
273 def require_cookie(request: Request) -> None:
274 calls.append(request.url.path)
275 if request.cookies.get("session") != "ok":
276 raise HTTPException(status_code=401)
277
278 dist = tmp_path / "dist"
279 write_file(dist / "index.html", "app")

Callers

nothing calls this directly

Calls 2

HTTPExceptionClass · 0.90
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…