-
-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reverseproxy: Expand port ranges to multiple upstreams in CLI + Caddy…
…file (#5494) * reverseproxy: Expand port ranges to multiple upstreams in CLI + Caddyfile * Add clarifying comment
- Loading branch information
1 parent
52d7335
commit 75b690d
Showing
5 changed files
with
173 additions
and
15 deletions.
There are no files selected for viewing
67 changes: 67 additions & 0 deletions
67
caddytest/integration/caddyfile_adapt/reverse_proxy_port_range.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
:8884 { | ||
# Port range | ||
reverse_proxy localhost:8001-8002 | ||
|
||
# Port range with placeholder | ||
reverse_proxy {host}:8001-8002 | ||
|
||
# Port range with scheme | ||
reverse_proxy https://localhost:8001-8002 | ||
} | ||
---------- | ||
{ | ||
"apps": { | ||
"http": { | ||
"servers": { | ||
"srv0": { | ||
"listen": [ | ||
":8884" | ||
], | ||
"routes": [ | ||
{ | ||
"handle": [ | ||
{ | ||
"handler": "reverse_proxy", | ||
"upstreams": [ | ||
{ | ||
"dial": "localhost:8001" | ||
}, | ||
{ | ||
"dial": "localhost:8002" | ||
} | ||
] | ||
}, | ||
{ | ||
"handler": "reverse_proxy", | ||
"upstreams": [ | ||
{ | ||
"dial": "{http.request.host}:8001" | ||
}, | ||
{ | ||
"dial": "{http.request.host}:8002" | ||
} | ||
] | ||
}, | ||
{ | ||
"handler": "reverse_proxy", | ||
"transport": { | ||
"protocol": "http", | ||
"tls": {} | ||
}, | ||
"upstreams": [ | ||
{ | ||
"dial": "localhost:8001" | ||
}, | ||
{ | ||
"dial": "localhost:8002" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters