582033
V2EX  ›  问与答

nginx 配置 sub_filter 替换无效

  •  
  •   582033 · Jul 8, 2016 · 1310 views
    This topic created in 3637 days ago, the information mentioned may be changed or developed.

    下面这段 nginx 配置

    location /lantern/ {
        proxy_set_header Accept-Encoding '';
        proxy_pass https://getlantern.org/;
        sub_filter '"/static' '"/lantern/static';
        sub_filter_once off;
    }
    

    问题 1 : proxy_set_header 无效 问题 2: sub_fiter 无效

    1 replies    2016-07-08 16:30:31 +08:00
    Zohar
        1
    Zohar  
       Jul 8, 2016 via Android
    加上下面这行试试看:
    ```
    proxy_set_header Connection "";
    ```
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5330 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 46ms · UTC 07:32 · PVG 15:32 · LAX 00:32 · JFK 03:32
    ♥ Do have faith in what you're doing.