582033
V2EX  ›  问与答

nginx 配置 sub_filter 替换无效

  •  
  •   582033 · Jul 8, 2016 · 1318 views
    This topic created in 3644 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   ·   3111 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 14:16 · PVG 22:16 · LAX 07:16 · JFK 10:16
    ♥ Do have faith in what you're doing.