如何避免在Nginx中使用subs_filter

时间:2018-11-05 11:40:54

标签: reactjs nginx mod-rewrite

有人可以建议如何在Nginx配置中重写最后2行

    location ^~ /kubeapps {
    rewrite ^/kubeapps(/.*)$ $1 break;

    proxy_pass http://<some_ip>:<port>;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header Host $host;
    proxy_cache_bypass $http_upgrade;


    # need to replace these lines with some 
    # other directives with the same functionality

    subs_filter href=/ href=http://<some_ip>:<port>/kubeapps;
    subs_filter src=/ src=http://<some_ip>:<port>/kubeapps;
     }

以其他形式?原因是我无法使用提供 subs_filter 指令的模块。

Thx

0 个答案:

没有答案