Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for HOSTS (2.48 sec)

  1. docs/en/docs/advanced/middleware.md

    {!../../../docs_src/advanced_middleware/tutorial002.py!}
    ```
    
    The following arguments are supported:
    
    * `allowed_hosts` - A list of domain names that should be allowed as hostnames. Wildcard domains such as `*.example.com` are supported for matching subdomains. To allow any hostname either use `allowed_hosts=["*"]` or omit the middleware.
    
    If an incoming request does not validate correctly then a `400` response will be sent.
    
    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)
  2. docs/zh/docs/advanced/middleware.md

    强制所有传入请求都必须正确设置 `Host` 请求头,以防 HTTP 主机头攻击。
    
    ```Python hl_lines="2  6-8"
    {!../../../docs_src/advanced_middleware/tutorial002.py!}
    ```
    
    支持以下参数:
    
    * `allowed_hosts` - 允许的域名(主机名)列表。`*.example.com` 等通配符域名可以匹配子域名,或使用 `allowed_hosts=["*"]` 允许任意主机名,或省略中间件。
    
    如果传入的请求没有通过验证,则发送 `400` 响应。
    
    ## `GZipMiddleware`
    
    处理 `Accept-Encoding` 请求头中包含 `gzip` 请求的 GZip 响应。
    
    中间件会处理标准响应与流响应。
    
    ```Python hl_lines="2  6"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 22:44:27 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  3. docs_src/advanced_middleware/tutorial002.py

    from fastapi import FastAPI
    from fastapi.middleware.trustedhost import TrustedHostMiddleware
    
    app = FastAPI()
    
    app.add_middleware(
        TrustedHostMiddleware, allowed_hosts=["example.com", "*.example.com"]
    )
    
    
    @app.get("/")
    async def main():
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 279 bytes
    - Viewed (0)
  4. docs/de/docs/advanced/middleware.md

    {!../../../docs_src/advanced_middleware/tutorial002.py!}
    ```
    
    Die folgenden Argumente werden unterstützt:
    
    * `allowed_hosts` – Eine Liste von Domain-Namen, die als Hostnamen zulässig sein sollten. Wildcard-Domains wie `*.example.com` werden unterstützt, um Subdomains zu matchen. Um jeden Hostnamen zu erlauben, verwenden Sie entweder `allowed_hosts=["*"]` oder lassen Sie diese Middleware weg.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:18:15 GMT 2024
    - 4.4K bytes
    - Viewed (0)
  5. docs/em/docs/advanced/middleware.md

    ```Python hl_lines="2  6-8"
    {!../../../docs_src/advanced_middleware/tutorial002.py!}
    ```
    
    📄 ❌ 🐕‍🦺:
    
    * `allowed_hosts` - 📇 🆔 📛 👈 🔜 ✔ 📛. 🃏 🆔 ✅ `*.example.com` 🐕‍🦺 🎀 📁. ✔ 🙆 📛 👯‍♂️ ⚙️ `allowed_hosts=["*"]` ⚖️ 🚫 🛠️.
    
    🚥 📨 📨 🔨 🚫 ✔ ☑ ⤴️ `400` 📨 🔜 📨.
    
    ## `GZipMiddleware`
    
    🍵 🗜 📨 🙆 📨 👈 🔌 `"gzip"` `Accept-Encoding` 🎚.
    
    🛠️ 🔜 🍵 👯‍♂️ 🐩 & 🎥 📨.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Apr 01 09:26:04 GMT 2023
    - 3.3K bytes
    - Viewed (0)
  6. docs/de/docs/deployment/docker.md

    Linux-Container werden mit demselben Linux-Kernel des Hosts (Maschine, virtuellen Maschine, Cloud-Servers, usw.) ausgeführt. Das bedeutet einfach, dass sie sehr leichtgewichtig sind (im Vergleich zu vollständigen virtuellen Maschinen, die ein gesamtes Betriebssystem emulieren).
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 18:19:17 GMT 2024
    - 38.9K bytes
    - Viewed (0)
Back to top