debug logging
This commit is contained in:
parent
278f9e32f0
commit
66e6b70602
|
@ -20,7 +20,8 @@ type Rule struct {
|
||||||
// address.
|
// address.
|
||||||
Service OriginService `json:"service"`
|
Service OriginService `json:"service"`
|
||||||
|
|
||||||
// Location is an optional string that can specify the Service path (overwriting the Hostname path).
|
// Location is an optional string specifying the Service path, which
|
||||||
|
// replaces the first subdirectory of the Hostname path
|
||||||
Location string `json:"location"`
|
Location string `json:"location"`
|
||||||
|
|
||||||
// Configure the request cloudflared sends to this specific origin.
|
// Configure the request cloudflared sends to this specific origin.
|
||||||
|
|
|
@ -84,7 +84,7 @@ func (p *Proxy) ProxyHTTP(
|
||||||
fmt.Println(fmt.Sprintf("before: req.URL.Path: %s", req.URL.Path))
|
fmt.Println(fmt.Sprintf("before: req.URL.Path: %s", req.URL.Path))
|
||||||
|
|
||||||
parts := strings.Split(req.URL.Path, "/")
|
parts := strings.Split(req.URL.Path, "/")
|
||||||
fmt.Println("parts:", parts)
|
// fmt.Println("parts:", parts)
|
||||||
|
|
||||||
if len(parts) > 1 {
|
if len(parts) > 1 {
|
||||||
parts[1] = rule.Location
|
parts[1] = rule.Location
|
||||||
|
|
Loading…
Reference in New Issue