Browse Source
The `net.JoinHostPort()` function has some naiive logic for handling IPv6, it just checks if the host part has a `:` and if so it wraps the host part with `[ ]` but this causes our network type prefix to get wrapped as well, which is invalid for `caddy.NetworkAddress`. Instead, we can just concatenate the host and port manually here to avoid this side-effect.master
Francis Lavoie
3 years ago
committed by
GitHub
2 changed files with 30 additions and 1 deletions
@ -0,0 +1,29 @@ |
|||||
|
example.com { |
||||
|
bind tcp6/[::] |
||||
|
} |
||||
|
---------- |
||||
|
{ |
||||
|
"apps": { |
||||
|
"http": { |
||||
|
"servers": { |
||||
|
"srv0": { |
||||
|
"listen": [ |
||||
|
"tcp6/[::]:443" |
||||
|
], |
||||
|
"routes": [ |
||||
|
{ |
||||
|
"match": [ |
||||
|
{ |
||||
|
"host": [ |
||||
|
"example.com" |
||||
|
] |
||||
|
} |
||||
|
], |
||||
|
"terminal": true |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue