- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 50 for redirected (0.18 sec)
-
docs/en/docs/advanced/middleware.md
## `HTTPSRedirectMiddleware` Enforces that all incoming requests must either be `https` or `wss`. Any incoming requests to `http` or `ws` will be redirected to the secure scheme instead. ```Python hl_lines="2 6" {!../../../docs_src/advanced_middleware/tutorial001.py!} ``` ## `TrustedHostMiddleware`
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 10 18:27:10 GMT 2023 - 4K bytes - Viewed (0) -
tests/test_router_redirect_slashes.py
assert response.status_code == 307 def test_redirect_slashes_disabled(): app = FastAPI(redirect_slashes=False) router = APIRouter() @router.get("/hello/") def hello_page() -> str: return "Hello, World!" app.include_router(router) client = TestClient(app) response = client.get("/hello/", follow_redirects=False) assert response.status_code == 200
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Jun 22 10:37:50 GMT 2023 - 974 bytes - Viewed (0) -
tests/test_tutorial/test_response_model/test_tutorial003_05.py
assert response.status_code == 200, response.text assert response.json() == {"message": "Here's your interdimensional portal."} def test_get_redirect(): response = client.get("/portal", params={"teleport": True}, follow_redirects=False) assert response.status_code == 307, response.text assert response.headers["location"] == "https://www.youtube.com/watch?v=dQw4w9WgXcQ" def test_openapi_schema():
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 3.4K bytes - Viewed (0) -
tests/test_tutorial/test_response_model/test_tutorial003_03.py
from fastapi.testclient import TestClient from docs_src.response_model.tutorial003_03 import app client = TestClient(app) def test_get_portal(): response = client.get("/teleport", follow_redirects=False) assert response.status_code == 307, response.text assert response.headers["location"] == "https://www.youtube.com/watch?v=dQw4w9WgXcQ" def test_openapi_schema(): response = client.get("/openapi.json")
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 1.1K bytes - Viewed (0) -
docs/en/docs/advanced/behind-a-proxy.md
[[http.services.app.loadBalancer.servers]] url = "http://127.0.0.1:8000" ``` This file configures Traefik to use the path prefix `/api/v1`. And then it will redirect its requests to your Uvicorn running on `http://127.0.0.1:8000`. Now start Traefik: <div class="termy"> ```console $ ./traefik --configFile=traefik.toml
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu May 02 22:37:31 GMT 2024 - 11.6K bytes - Viewed (2) -
docs/ja/docs/deployment/concepts.md
次の章では、FastAPIアプリケーションをデプロイするための**具体的なレシピ**を紹介します。 しかし、今はこれらの重要な**コンセプトに基づくアイデア**を確認しましょう。これらのコンセプトは、他のどのタイプのWeb APIにも当てはまります。💡 ## セキュリティ - HTTPS <!-- NOTE: https.md written in Japanese does not exist, so it redirects to English one --> [前チャプターのHTTPSについて](https.md){.internal-link target=_blank}では、HTTPSがどのようにAPIを暗号化するのかについて学びました。 通常、アプリケーションサーバにとって**外部の**コンポーネントである**TLS Termination Proxy**によって提供されることが一般的です。このプロキシは通信の暗号化を担当します。
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 24.1K bytes - Viewed (0) -
tests/test_tutorial/test_custom_response/test_tutorial006c.py
from fastapi.testclient import TestClient from docs_src.custom_response.tutorial006c import app client = TestClient(app) def test_redirect_status_code(): response = client.get("/pydantic", follow_redirects=False) assert response.status_code == 302 assert response.headers["location"] == "https://docs.pydantic.dev/" def test_openapi_schema(): response = client.get("/openapi.json")
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 899 bytes - Viewed (0) -
tests/test_tutorial/test_custom_response/test_tutorial006b.py
from fastapi.testclient import TestClient from docs_src.custom_response.tutorial006b import app client = TestClient(app) def test_redirect_response_class(): response = client.get("/fastapi", follow_redirects=False) assert response.status_code == 307 assert response.headers["location"] == "https://fastapi.tiangolo.com" def test_openapi_schema(): response = client.get("/openapi.json")
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 899 bytes - Viewed (0) -
docs_src/custom_docs_ui/tutorial001.py
get_swagger_ui_html, get_swagger_ui_oauth2_redirect_html, ) app = FastAPI(docs_url=None, redoc_url=None) @app.get("/docs", include_in_schema=False) async def custom_swagger_ui_html(): return get_swagger_ui_html( openapi_url=app.openapi_url, title=app.title + " - Swagger UI", oauth2_redirect_url=app.swagger_ui_oauth2_redirect_url,
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Mon Oct 30 09:58:58 GMT 2023 - 1.1K bytes - Viewed (0) -
docs_src/custom_docs_ui/tutorial002.py
title=app.title + " - Swagger UI", oauth2_redirect_url=app.swagger_ui_oauth2_redirect_url, swagger_js_url="/static/swagger-ui-bundle.js", swagger_css_url="/static/swagger-ui.css", ) @app.get(app.swagger_ui_oauth2_redirect_url, include_in_schema=False) async def swagger_ui_redirect(): return get_swagger_ui_oauth2_redirect_html() @app.get("/redoc", include_in_schema=False)
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Aug 19 19:54:04 GMT 2023 - 1.1K bytes - Viewed (0)