mirror of
https://github.com/caddyserver/caddy.git
synced 2026-05-21 06:16:31 -04:00
* Create request_id directive #1590 * Address Comments * Fix TestListenerAddrEqual * requestid: Add some tests * Address Comments by tobya * Address Comments
This commit is contained in:
@@ -243,6 +243,9 @@ func (r *replacer) getSubstitution(key string) string {
|
||||
case "{path_escaped}":
|
||||
u, _ := r.request.Context().Value(OriginalURLCtxKey).(url.URL)
|
||||
return url.QueryEscape(u.Path)
|
||||
case "{request_id}":
|
||||
reqid, _ := r.request.Context().Value(RequestIDCtxKey).(string)
|
||||
return reqid
|
||||
case "{rewrite_path}":
|
||||
return r.request.URL.Path
|
||||
case "{rewrite_path_escaped}":
|
||||
|
||||
Reference in New Issue
Block a user