code: func CleanMaskedPath(reqPath string, masks ...string) string {
  	var replacerVal string
  	maskMap := make(map[string]string)
  
  	// Iterate over supplied masks and create temporary replacement strings
  	// only for the masks that are present in the path, then replace all occurrences
  	for _, mask := range masks {
  		if strings.Index(reqPath, mask) >= 0 {
  			replacerVal = "/_caddy" + generateRandomString() + "__"
  			maskMap[mask] = replacerVal
  			reqPath = strings.Replace(reqPath, mask, replacerVal, -1)
  		}
  	}
  
  	reqPath = path.Clean(reqPath)
  
  	// Revert the replaced masks after path cleanup
  	for mask, replacerVal := range maskMap {
  		reqPath = strings.Replace(reqPath, replacerVal, mask, -1)
  	}
  	return reqPath
  }
docs: // CleanMaskedPath prevents one or more of the path cleanup operations:
  //   - collapse multiple slashes into one
  //   - eliminate "/." (current directory)
  //   - eliminate "<parent_directory>/.."
  // by masking certain patterns in the path with a temporary random string.
  // This could be helpful when certain patterns in the path are desired to be preserved
  // that would otherwise be changed by path.Clean().
  // One such use case is the presence of the double slashes as protocol separator
  // (e.g., /api/endpoint/http://example.com).
  // This is a common pattern in many applications to allow passing URIs as path argument.