mirror of
https://github.com/apple/pkl.git
synced 2026-03-27 03:21:13 +01:00
Add support for HTTP rewrites (#1062)
This adds a new configuration option for the HTTP client to replace URI prefixes when making outbound calls. Follows the design of https://github.com/apple/pkl-evolution/pull/17
This commit is contained in:
@@ -152,3 +152,14 @@ Example: `example.com,169.254.0.0/16` +
|
||||
Comma separated list of hosts to which all connections should bypass the proxy.
|
||||
Hosts can be specified by name, IP address, or IP range using https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation[CIDR notation].
|
||||
====
|
||||
|
||||
.--http-rewrite
|
||||
[%collapsible]
|
||||
====
|
||||
Default: (none) +
|
||||
Example: `\https://pkg.pkl-lang.org/=https://my.internal.mirror/` +
|
||||
Replace outbound HTTP(S) requests from one URL with another URL.
|
||||
The left-hand side describes the source prefix, and the right-hand describes the target prefix.
|
||||
This option is commonly used to enable package mirroring.
|
||||
The above example will rewrite URL `\https://pkg.pkl-lang.org/pkl-k8s/k8s@1.0.0` to `\https://my.internal.mirror/pkl-k8s/k8s@1.0.0`.
|
||||
====
|
||||
|
||||
Reference in New Issue
Block a user