1

私は fcgi オーソライザーの回避策を探しています。これが私のテスト構成の外観です。

        location ~* "f4m$" {
                limit_except GET {
                        deny all;
                }
                auth_request /clu;
                auth_request_set $node $upstream_http_server;
# Problem's that $node is always empty for <if> in this context
                proxy_set_header Node $node;
                proxy_pass http://127.0.0.1/group_1tv$request_uri;
        }
        location = /clu {
                internal;

                proxy_pass_request_body off;
                proxy_pass_request_headers off;
                proxy_set_header Content-Length '';

                proxy_pass http://cluster_authorizer$request_uri;
        }
}

サブリクエストが返された直後に変数$nodewithing構造体をテストできれば、それはすべて幸せで良いことです。if残念ながら、それは常に空であり、それに取り組むために別のサーバーをセットアップする必要があります。

server {
        server_name 127.0.0.1;
        location /group_1tv/ {
                if ($request_uri ~ "^/[^/]+(.*)") {}
                if ($http_node) {return http://$http_node$1;}

                proxy_cache hyvd;
                proxy_cache_valid any 1d;
                proxy_pass http://backend_group_1tv/;
        }
}

残念ながら、これは $http_node が空でない場合にのみ機能し、それ以外の場合は 400 (不明な場所) を返します。デバッグ ログには理由が説明されていません。

2014/02/02 18:31:15 [debug] 9602#0: *18 http upstream request: "/hds-live/livepkgr/_definst_/1tv.f4m?r=334"
2014/02/02 18:31:15 [debug] 9602#0: *18 http upstream process header
2014/02/02 18:31:15 [debug] 9602#0: *18 malloc: 09C12AD8:4096
2014/02/02 18:31:15 [debug] 9602#0: *18 recv: fd:12 137 of 4096
2014/02/02 18:31:15 [debug] 9602#0: *18 http proxy status 400 "400 Unknown location"

私はこれに丸2日を費やしましたが、本当に新鮮なインプットが必要です...

4

1 に答える 1