1. Caddy version (caddy version
):
v2.4.6 h1:HGkGICFGvyrodcqOOclHKfvJC0qTU7vny/7FhYp9hNw=
2. How I run Caddy:
caddy.exe with config file
a. System environment:
Windows
b. Command:
caddy.exe run
d. My complete Caddyfile or JSON config:
{
order request_id before header
}
https://domain {
request_id
encode gzip
log {
output file D:\caddy\logs\domain_access.log {
roll true # Rotate logs, enabled by default
roll_size_mb 5 # Set max size 5 MB
roll_gzip true # Whether to compress rolled files
roll_local_time true # Use localhost time
roll_keep 2 # Keep at most 2 log files
roll_keep_days 7 # Keep log files for 7 days
}
}
reverse_proxy 192.168.1.2:1234/p/?RandomID={http.request_id}
basicauth {
username phash
}
}
3. The problem Iâm having:
What I get with configuration of user input to url as an example below
Current form which will give invalid url
192.168.1.2:1234/p/?RandomID={http.request_id}w100 â where w100 is userinput after url
What I would like and have trying to figure out but never understood.
192.168.1.2:1234/p/{USER INPUT}?RandomID={http.request_id}
192.168.1.2:1234/p/w100?RandomID={http.request_id}
5. What I already tried:
I tried messing with rewrite and uri but I think Im on deep water or simply donât understand it properly.
If it makes anything easier it would only be the number at w100 that would be changed by userinput in url, so 100 could be 935 or anything else just pure numbering.
Iâm also using an extra plugin to generate the uuid which I selected beneath and added to compile file > download.
github.com/
lolPants/caddy-requestid
http.handlers.request_id implements an HTTP handler that writes a unique request ID to response headers.