debug logging

This commit is contained in:
regnaio 2022-03-29 14:02:56 -04:00
parent 278f9e32f0
commit 66e6b70602
2 changed files with 3 additions and 2 deletions

View File

@ -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.

View File

@ -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