Module ngx_http_mirror_module

設定例
ディレクティブ
     mirror
     mirror_request_body

ngx_http_mirror_module モジュール (1.13.4) はバックグランドのミラー サブリクエストを作成することで、元のリクエストのミラーリングを実装します。ミラー サブリクエストへの応答は無視されます。

設定例

location / {
    mirror /mirror;
    proxy_pass http://backend;
}

location = /mirror {
    internal;
    proxy_pass http://test_backend$request_uri;
}

ディレクティブ

構文: mirror uri | off;
デフォルト:
mirror off;
コンテキスト: http, server, location

元のリクエストがミラーされる先のURIを設定します。幾つかのミラーを同じ設定レベルで設定することができます。

構文: mirror_request_body on | off;
デフォルト:
mirror_request_body on;
コンテキスト: http, server, location

クライアント リクエストのボディがミラーされるかどうかを指示します。有効な場合、クライアント リクエストのボディがミラー サブリクエストを作成する前に読み込まれるでしょう。この場合、proxy_request_buffering, fastcgi_request_buffering, scgi_request_buffering および uwsgi_request_buffering ディレクティブによって設定されプロキシしているバッファされていないクライアントのリクエスト ボディは無効にされるでしょう。

location / {
    mirror /mirror;
    mirror_request_body off;
    proxy_pass http://backend;
}

location = /mirror {
    internal;
    proxy_pass http://log_backend;
    proxy_pass_request_body off;
    proxy_set_header Content-Length "";
    proxy_set_header X-Original-URI $request_uri;
}

TOP
inserted by FC2 system