mirror of
https://github.com/caddyserver/caddy.git
synced 2026-05-21 06:16:31 -04:00
Misc. changes: {hostonly} placeholder, self_signed port fix
This commit is contained in:
@@ -69,7 +69,14 @@ func NewReplacer(r *http.Request, rr *ResponseRecorder, emptyValue string) Repla
|
||||
}
|
||||
return name
|
||||
}(),
|
||||
"{host}": r.Host,
|
||||
"{host}": r.Host,
|
||||
"{hostonly}": func() string {
|
||||
host, _, err := net.SplitHostPort(r.Host)
|
||||
if err != nil {
|
||||
return r.Host
|
||||
}
|
||||
return host
|
||||
}(),
|
||||
"{path}": r.URL.Path,
|
||||
"{path_escaped}": url.QueryEscape(r.URL.Path),
|
||||
"{query}": r.URL.RawQuery,
|
||||
|
||||
Reference in New Issue
Block a user