From: Sebastián Ramírez Date: Sat, 27 Jan 2024 09:39:50 +0000 (+0100) Subject: 📝 Tweak docs for Behind a Proxy (#11038) X-Git-Tag: 0.109.1~70 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d522cdcb7a9762acaf03b25dc1fa2e500751c228;p=thirdparty%2Ffastapi%2Ffastapi.git 📝 Tweak docs for Behind a Proxy (#11038) --- diff --git a/docs/en/docs/advanced/behind-a-proxy.md b/docs/en/docs/advanced/behind-a-proxy.md index 01998cc912..4da2ddefc4 100644 --- a/docs/en/docs/advanced/behind-a-proxy.md +++ b/docs/en/docs/advanced/behind-a-proxy.md @@ -18,7 +18,11 @@ In this case, the original path `/app` would actually be served at `/api/v1/app` Even though all your code is written assuming there's just `/app`. -And the proxy would be **"stripping"** the **path prefix** on the fly before transmitting the request to Uvicorn, keep your application convinced that it is serving at `/app`, so that you don't have to update all your code to include the prefix `/api/v1`. +```Python hl_lines="6" +{!../../../docs_src/behind_a_proxy/tutorial001.py!} +``` + +And the proxy would be **"stripping"** the **path prefix** on the fly before transmitting the request to Uvicorn, keeping your application convinced that it is being served at `/app`, so that you don't have to update all your code to include the prefix `/api/v1`. Up to here, everything would work as normally.