1. Caddy version (caddy version
):
v2.3.0 h1:fnrqJLa3G5vfxcxmOH/+kJOcunPLhSBnjgIvjXV/QTA=
2. How I run Caddy:
caddy run
a. System environment:
Debian GNU/Linux 10
b. Command:
caddy run
c. Service/unit/compose file:
Paste full file contents here.
Make sure backticks stay on their own lines,
and the post looks nice in the preview pane.
d. My complete Caddyfile or JSON config:
(to-lower) {
@{args.1} path_regexp {args.1} (.*)\.{args.0}
redir @{args.1} {re.{args.1}.1}.{args.1}
}
domain.com {
import to-lower JPG jpg
import to-lower JPEG jpeg
import to-lower PNG png
import to-lower GIF gif
uri replace "%20" "-"
uri replace " " "-"
uri replace "(" ""
uri replace ")" ""
# uri replace "[\?\[\]\/\\\\=\<\>\:\;\,\"\'\&\$\#\*\(\)\|\~\`\!\{\}\%\+\]" ""
reverse_proxy 10.10.10.101 {
header_up X-Forwarded-Proto https
header_up X-Forwarded-Port 443
}
3. The problem I’m having:
I would like to remove all special characters from this regex from the file requests:
[?[]/\\=<>:;,"’&$#*()|~`!{}%+]
They shouldn’t be replaced just removed.
4. Error messages and/or full log output:
5. What I already tried:
I have been trying to get this working for a single char:
uri replace “(” “”
But that doesn’t do anything at all it seems