Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 39 for staging (0.18 sec)

  1. tests/test_openapi_servers.py

                {
                    "url": IsOneOf(
                        "http://staging.localhost.tiangolo.com:8000/",
                        # TODO: remove when deprecating Pydantic v1
                        "http://staging.localhost.tiangolo.com:8000",
                    ),
                    "description": "Staging but actually localhost still",
                },
                {
                    "url": IsOneOf(
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 2K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_behind_a_proxy/test_tutorial003.py

                        "https://stag.example.com/",
                        # TODO: remove when deprecating Pydantic v1
                        "https://stag.example.com",
                    ),
                    "description": "Staging environment",
                },
                {
                    "url": IsOneOf(
                        "https://prod.example.com/",
                        # TODO: remove when deprecating Pydantic v1
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 1.6K bytes
    - Viewed (0)
  3. docs/en/docs/advanced/behind-a-proxy.md

    By default, **FastAPI** will create a `server` in the OpenAPI schema with the URL for the `root_path`.
    
    But you can also provide other alternative `servers`, for example if you want *the same* docs UI to interact with a staging and production environments.
    
    If you pass a custom list of `servers` and there's a `root_path` (because your API lives behind a proxy), **FastAPI** will insert a "server" with this `root_path` at the beginning of the list.
    
    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)
  4. docs/de/docs/advanced/behind-a-proxy.md

    Sie können aber auch andere alternative `server` bereitstellen, beispielsweise wenn Sie möchten, dass *dieselbe* Dokumentationsoberfläche mit einer Staging- und Produktionsumgebung interagiert.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:30:07 GMT 2024
    - 13.1K bytes
    - Viewed (0)
  5. docs_src/behind_a_proxy/tutorial003.py

    from fastapi import FastAPI, Request
    
    app = FastAPI(
        servers=[
            {"url": "https://stag.example.com", "description": "Staging environment"},
            {"url": "https://prod.example.com", "description": "Production environment"},
        ],
        root_path="/api/v1",
    )
    
    
    @app.get("/app")
    def read_main(request: Request):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jul 10 17:28:18 GMT 2020
    - 405 bytes
    - Viewed (0)
  6. docs_src/behind_a_proxy/tutorial004.py

    from fastapi import FastAPI, Request
    
    app = FastAPI(
        servers=[
            {"url": "https://stag.example.com", "description": "Staging environment"},
            {"url": "https://prod.example.com", "description": "Production environment"},
        ],
        root_path="/api/v1",
        root_path_in_servers=False,
    )
    
    
    @app.get("/app")
    def read_main(request: Request):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jul 10 17:28:18 GMT 2020
    - 437 bytes
    - Viewed (0)
  7. tests/test_tutorial/test_behind_a_proxy/test_tutorial004.py

                        "https://stag.example.com/",
                        # TODO: remove when deprecating Pydantic v1
                        "https://stag.example.com",
                    ),
                    "description": "Staging environment",
                },
                {
                    "url": IsOneOf(
                        "https://prod.example.com/",
                        # TODO: remove when deprecating Pydantic v1
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 1.6K bytes
    - Viewed (0)
  8. docs/zh/docs/advanced/behind-a-proxy.md

    ## 附加的服务器
    
    !!! warning "警告"
    
        此用例较难,可以跳过。
    
    默认情况下,**FastAPI** 使用 `root_path` 的链接在 OpenAPI 概图中创建 `server`。
    
    但也可以使用其它备选 `servers`,例如,需要同一个 API 文档与 staging 和生产环境交互。
    
    如果传递自定义 `servers` 列表,并有 `root_path`( 因为 API 使用了代理),**FastAPI** 会在列表开头使用这个 `root_path` 插入**服务器**。
    
    例如:
    
    ```Python hl_lines="4-7"
    {!../../../docs_src/behind_a_proxy/tutorial003.py!}
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 10.4K bytes
    - Viewed (0)
  9. docs/en/docs/tutorial/middleware.md

        But if you have custom headers that you want a client in a browser to be able to see, you need to add them to your CORS configurations ([CORS (Cross-Origin Resource Sharing)](cors.md){.internal-link target=_blank}) using the parameter `expose_headers` documented in <a href="https://www.starlette.io/middleware/#corsmiddleware" class="external-link" target="_blank">Starlette's CORS docs</a>.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 2.9K bytes
    - Viewed (0)
  10. docs/de/docs/tutorial/middleware.md

    class="external-link" target="_blank">Verwenden Sie dafür das Präfix 'X-'</a>.
    
        Wenn Sie jedoch benutzerdefinierte Header haben, die ein Client in einem Browser sehen soll, müssen Sie sie zu Ihrer CORS-Konfigurationen ([CORS (Cross-Origin Resource Sharing)](cors.md){.internal-link target=_blank}) hinzufügen, indem Sie den Parameter `expose_headers` verwenden, der in der <a href="https://www.starlette.io/middleware/#corsmiddleware" class="external-link" target="_blank">Starlette-CORS-Dokumentation</a>...
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Jan 23 11:26:59 GMT 2024
    - 3.4K bytes
    - Viewed (0)
Back to top