diff options
| author | altaf-creator <dev@altafcreator.com> | 2026-07-06 21:27:00 +0800 |
|---|---|---|
| committer | altaf-creator <dev@altafcreator.com> | 2026-07-06 21:27:00 +0800 |
| commit | 77d001db4a6dfd7b232c4b08b08842379cde739d (patch) | |
| tree | 41d1550d8271d9a09ea63ba02f90458cfce029ac | |
| parent | f24b76f84740d4aa3db3183b3f134db21fd149df (diff) | |
check redir
| -rw-r--r-- | main.py | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -48,6 +48,7 @@ async def force_trailing_slash(request: fastapi.Request, call_next): if not path.endswith("/") and not Path(path).suffix: new_url = str(request.url.replace(path=path + "/")) + print("redirect to", new_url) return fastapi.responses.RedirectResponse(url=new_url, status_code=301) response = await call_next(request) |
