Expand description
/etc/hosts management for the reverse proxy.
Automatically syncs registered slug hostnames into /etc/hosts so that
browsers can resolve them (needed for Safari, which doesn’t auto-resolve
.localhost subdomains, and for custom TLDs like .test).
Entries are managed inside a marked block delimited by
# pitchfork-start / # pitchfork-end. The block is replaced on each
sync and removed entirely on proxy shutdown.
Functions§
- clean_
hosts_ file - Remove the pitchfork-managed block from /etc/hosts.
- sync_
hosts_ file - Sync all registered slug hostnames into /etc/hosts.
- sync_
hosts_ from_ settings - Refresh
/etc/hostsfrom the current settings if sync is enabled.