V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
The Go Programming Language
http://golang.org/
Go Playground
Go Projects
Revel Web Framework
alpinefly

板上有熟悉 caddy 的大牛吗?咨询一下 caddy 内容替换的问题?

  •  
  •   alpinefly · Aug 7, 2019 · 4244 views
    This topic created in 2467 days ago, the information mentioned may be changed or developed.
    简单反向代理正常:
    xxx.com:443 {
    tls /usr/local/bin/cert/xxx.crt /usr/local/bin/cert/xxx.key
    root /www
    gzip
    index index.html
    proxy / https://github.com
    }
    增加内容替换后失败:
    xxx.com:443 {
    tls /usr/local/bin/cert/xxx.crt /usr/local/bin/cert/xxx.key
    root /www
    gzip
    index index.html
    proxy / https://github.com
    filter rule {
    path .*\.html
    search_pattern <footer class="footer mt-6">
    replacement <footer class="footer mt-6" style="display:none;">
    }
    }
    5 replies    2019-08-07 11:49:27 +08:00
    alpinefly
        1
    alpinefly  
    OP
       Aug 7, 2019
    对了 caddy 有没有调试命令类似 nginx -t 这种?
    BOYPT
        2
    BOYPT  
       Aug 7, 2019
    search_pattern 里面跟的是正则,大概你的< >影响了
    Keyes
        3
    Keyes  
       Aug 7, 2019
    离题回复:“板上”我去这两个字至少有十多年没见过了
    MonoLogueChi
        4
    MonoLogueChi  
       Aug 7, 2019 via Android
    做 htmlencode 试一下
    janxin
        5
    janxin  
       Aug 7, 2019
    @liuyinltemp -validate
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2682 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 15:52 · PVG 23:52 · LAX 08:52 · JFK 11:52
    ♥ Do have faith in what you're doing.