Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reverseproxy: Add support for specifying IDs in Caddyfile
- Loading branch information
1 parent
a5f4fae
commit 5968ebd
Showing
2 changed files
with
54 additions
and
2 deletions.
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
caddytest/integration/caddyfile_adapt/reverse_proxy_ids.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,46 @@ | ||
:8884 | ||
|
||
reverse_proxy one|http://localhost two|http://localhost { | ||
to three|srv+http://localhost four|srv+http://localhost | ||
} | ||
---------- | ||
{ | ||
"apps": { | ||
"http": { | ||
"servers": { | ||
"srv0": { | ||
"listen": [ | ||
":8884" | ||
], | ||
"routes": [ | ||
{ | ||
"handle": [ | ||
{ | ||
"handler": "reverse_proxy", | ||
"upstreams": [ | ||
{ | ||
"dial": "localhost:80", | ||
"id": "one" | ||
}, | ||
{ | ||
"dial": "localhost:80", | ||
"id": "two" | ||
}, | ||
{ | ||
"id": "three", | ||
"lookup_srv": "localhost" | ||
}, | ||
{ | ||
"id": "four", | ||
"lookup_srv": "localhost" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} |
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