582033
V2EX  ›  问与答

nginx 配置 sub_filter 替换无效

  •  
  •   582033 · Jul 8, 2016 · 1284 views
    This topic created in 3622 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   ·   1393 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 17:05 · PVG 01:05 · LAX 10:05 · JFK 13:05
    ♥ Do have faith in what you're doing.