caddy-filter
caddy-filter copied to clipboard
Provides a directive to filter response bodies in caddy.
Caddy does not appear to include the filter directive by default. This repo documents the behaviour of the filter but not how to enable this function in caddy. If possible...
Have wordpress site but seems wp content like css etc. still point to http though main domain loads on https. so wanted to change response from proxy for static resource...
I'm using v1 right now and it doesn't seem to work: ```hcl 0.0.0.0 browse log stdout errors stdout filter rule { content_type text/html.* search_pattern Connections replacement blabla } proxy /...
First is right: 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 } Next is wrong: xxx.com:443 { tls /usr/local/bin/cert/xxx.crt /usr/local/bin/cert/xxx.key root /www gzip index index.html...
## 1. Which version of Caddy are you using (`caddy -version`)? Caddy v1.0.0 (h1:KI6RPGih2GFzWRPG8s9clKK28Ns4ZlVMKR/v7mxq6+c=) ## 2. What are you trying to do? I can’t verify after using the filter on...
The replacement variable ``hostonly`` could be useful in combination with reverse proxy to replace the host dynamically but let the port be static
As the title already says. I need it because of some rules for the reverse proxy. PR is coming.
Do you know if we can use filter for errors page ? ``` errors { * errors_pages/error_page.html } filter rule { path "errors_pages/error_page.html" search_pattern "ERROR_CODE" replacement "{status}" } ```
``` content_type text/json.* search_pattern "(https:\\/\\/.+\.(?:(?i)jpg|jpeg|png|bmp|gif))" replacement "{1}" what I get: https: \/\/{request_host}\/imageproxy\/https: \\/\\/whatever.jpg ```
is there a way to run the filter before the rewrite? for example ``` filter rule { path somePath search_pattern (.*) replacement "Some Title" } rewrite { to {path} {path}/...