clawdi 0.13.26 → 0.13.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +348 -348
- package/egress-addon/clawdi_egress_addon.py +6 -1
- package/package.json +1 -1
|
@@ -476,7 +476,12 @@ def apply_http_rewrite(flow: Any, profile: dict[str, Any], secrets: dict[str, st
|
|
|
476
476
|
flow.request.port = parsed.port or default_port(parsed.scheme)
|
|
477
477
|
header_set(flow.request.headers, "host", parsed.netloc)
|
|
478
478
|
preserve_path = bool(rewrite.get("preservePath", True))
|
|
479
|
-
|
|
479
|
+
if preserve_path:
|
|
480
|
+
flow.request.path = combine_paths(parsed.path or "/", original_path)
|
|
481
|
+
else:
|
|
482
|
+
original_query = urlsplit(original_path).query
|
|
483
|
+
target_path = parsed.path or "/"
|
|
484
|
+
flow.request.path = f"{target_path}?{original_query}" if original_query else target_path
|
|
480
485
|
apply_rewrite_headers(flow, profile, secrets)
|
|
481
486
|
|
|
482
487
|
|