mirror of
https://github.com/caddyserver/caddy.git
synced 2024-11-29 20:24:11 +08:00
0c07f7adcc
Turns out having each server block share a single server.Config during initialization when the Setup functions are being called was a bad idea. Sure, startup and shutdown functions were only executed once, but they had no idea what their hostname or port was. So here we revert to the old way of doing things where Setup may be called multiple times per server block (once per host associated with the block, to be precise), but the Setup functions now know their host and port since the config belongs to exactly one virtualHost. To have something happen just once per server block, use OncePerServerBlock, a new function available on each Controller. |
||
---|---|---|
.. | ||
dispenser_test.go | ||
dispenser.go | ||
import_test1.txt | ||
import_test2.txt | ||
lexer_test.go | ||
lexer.go | ||
parse_test.go | ||
parse.go | ||
parsing_test.go | ||
parsing.go |