Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 31 - 40 of 125 for middleware (0.07 seconds)

  1. docs/en/docs/advanced/wsgi.md

    ///
    
    You need to import `WSGIMiddleware` from `a2wsgi`.
    
    Then wrap the WSGI (e.g. Flask) app with the middleware.
    
    And then mount that under a path.
    
    {* ../../docs_src/wsgi/tutorial001_py310.py hl[1,3,23] *}
    
    /// note
    
    Previously, it was recommended to use `WSGIMiddleware` from `fastapi.middleware.wsgi`, but it is now deprecated.
    
    It’s advised to use the `a2wsgi` package instead. The usage remains the same.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 1.4K bytes
    - Click Count (0)
  2. cmd/api-router.go

    		w = &trackingResponseWriter{ResponseWriter: w}
    
    		// Wrap the actual handler with the appropriate tracing middleware.
    		var tracedHandler http.HandlerFunc
    		if handlerFlags.has(traceHdrsS3HFlag) {
    			tracedHandler = httpTraceHdrs(f)
    		} else {
    			tracedHandler = httpTraceAll(f)
    		}
    
    		// Skip wrapping with the gzip middleware if specified.
    		gzippedHandler := tracedHandler
    		if !handlerFlags.has(noGZS3HFlag) {
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Fri Oct 24 04:05:19 GMT 2025
    - 23.3K bytes
    - Click Count (0)
  3. docs/zh-hant/docs/advanced/wsgi.md

    /// info
    
    這需要先安裝 `a2wsgi`,例如使用 `pip install a2wsgi`。
    
    ///
    
    你需要從 `a2wsgi` 匯入 `WSGIMiddleware`。
    
    然後用該 middleware 包住 WSGI(例如 Flask)應用。
    
    接著把它掛載到某個路徑下。
    
    {* ../../docs_src/wsgi/tutorial001_py310.py hl[1,3,23] *}
    
    /// note
    
    先前建議使用來自 `fastapi.middleware.wsgi` 的 `WSGIMiddleware`,但現在已棄用。
    
    建議改用 `a2wsgi` 套件。用法保持相同。
    
    只要確保已安裝 `a2wsgi`,並從 `a2wsgi` 正確匯入 `WSGIMiddleware` 即可。
    
    ///
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 1.4K bytes
    - Click Count (0)
  4. docs/en/docs/advanced/response-headers.md

    to be able to see, you need to add them to your CORS configurations (read more in [CORS (Cross-Origin Resource Sharing)](../tutorial/cors.md)), using the parameter `expose_headers` documented in [Starlette's CORS docs](https://www.starlette.dev/middleware/#corsmiddleware)....
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 2.2K bytes
    - Click Count (0)
  5. fastapi/applications.py

    from starlette.datastructures import State
    from starlette.exceptions import HTTPException
    from starlette.middleware import Middleware
    from starlette.middleware.base import BaseHTTPMiddleware
    from starlette.middleware.errors import ServerErrorMiddleware
    from starlette.middleware.exceptions import ExceptionMiddleware
    from starlette.requests import Request
    from starlette.responses import HTMLResponse, JSONResponse, Response
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Apr 01 16:16:24 GMT 2026
    - 178.6K bytes
    - Click Count (0)
  6. docs/uk/llm-prompt.md

    - callable: викликаємий
    - code: код
    - commit: фіксація
    - context manager: менеджер контексту
    - coroutine: співпрограма
    - engine: рушій
    - fake X: фальшивий X
    - item: предмет
    - lock: блокування
    - middleware: проміжне програмне забезпечення
    - mounting: монтування
    - origin: джерело
    - override: переписування
    - payload: корисне навантаження
    - processor: процесор
    - property: властивість
    - proxy: представник
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Feb 04 16:47:51 GMT 2026
    - 4K bytes
    - Click Count (0)
  7. docs/en/docs/how-to/custom-request-and-route.md

    # Custom Request and APIRoute class { #custom-request-and-apiroute-class }
    
    In some cases, you may want to override the logic used by the `Request` and `APIRoute` classes.
    
    In particular, this may be a good alternative to logic in a middleware.
    
    For example, if you want to read or manipulate the request body before it is processed by your application.
    
    /// danger
    
    This is an "advanced" feature.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 4.4K bytes
    - Click Count (0)
  8. docs/zh-hant/docs/tutorial/cors.md

    想進一步了解 <abbr title="Cross-Origin Resource Sharing - 跨來源資源共用">CORS</abbr>,請參考 [Mozilla 的 CORS 文件](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS)。
    
    /// note | 技術細節
    
    你也可以使用 `from starlette.middleware.cors import CORSMiddleware`。
    
    **FastAPI** 在 `fastapi.middleware` 中提供了幾個中介軟體,做為開發者的便利性。但多數可用的中介軟體其實直接來自 Starlette。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 5K bytes
    - Click Count (0)
  9. docs/zh-hant/docs/how-to/custom-request-and-route.md

    # 自訂 Request 與 APIRoute 類別 { #custom-request-and-apiroute-class }
    
    在某些情況下,你可能想要覆寫 `Request` 與 `APIRoute` 類別所使用的邏輯。
    
    特別是,這可能是替代中介軟體(middleware)中實作邏輯的一個好方法。
    
    例如,如果你想在應用程式處理之前讀取或操作請求本文(request body)。
    
    /// danger
    
    這是進階功能。
    
    如果你剛開始使用 **FastAPI**,可以先跳過本節。
    
    ///
    
    ## 使用情境 { #use-cases }
    
    可能的使用情境包括:
    
    * 將非 JSON 的請求本文轉換為 JSON(例如 [`msgpack`](https://msgpack.org/index.html))。
    * 解壓縮以 gzip 壓縮的請求本文。
    * 自動記錄所有請求本文。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 4.2K bytes
    - Click Count (0)
  10. cmd/admin-router.go

    // name of the function handler passed (this handler must be a method of
    // `adminAPIHandlers`).
    //
    // - sets up call to send AuditLog
    //
    // While this is a middleware function (i.e. it takes a handler function and
    // returns one), due to flags being passed based on required conditions, it is
    // done per-"handler function registration" in the router.
    //
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Fri Oct 10 18:57:03 GMT 2025
    - 26.7K bytes
    - Click Count (0)
Back to Top