- Sort Score
- Num 10 results
- Language All
Results 1 - 1 of 1 for test_root_path_does_not_persist_across_requests (0.15 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
tests/test_openapi_cache_root_path.py
from fastapi import FastAPI from fastapi.testclient import TestClient def test_root_path_does_not_persist_across_requests(): app = FastAPI() @app.get("/") def read_root(): # pragma: no cover return {"ok": True} # Attacker request with a spoofed root_path attacker_client = TestClient(app, root_path="/evil-api") response1 = attacker_client.get("/openapi.json") data1 = response1.json()Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 24 09:28:10 GMT 2026 - 2.3K bytes - Click Count (0)