replacer/config.example.toml

27 lines
952 B
TOML

bind = '127.0.0.1'
# you can also bind to a unix socket, and environment vars are supported:
# bind = '$RUNTIME_DIRECTORY/replacer.sock'
port = '8000'
# if using a unix socket, you can specify the file access mode here. it defaults to 0o775.
socket_mod = 0o777
# whether to enable request logging. disabled by default
debug = true
# replace foo with bar and baz with quux for site1.example
[hosts."site1.example"]
upstream = 'http://localhost:3001'
replacements = [
{pattern = 'foo', repl = 'bar'},
{pattern = 'baz', repl = 'quux'},
]
# which mime types to replace for. defaults to all mime types.
# `x/y` also matches `x/a+y`, `x/b+y`, `x/c+y` etc.
mime_types = ['text/html', 'application/json']
# path prefixes not to replace for. these are applied in descending order of length.
excluded_routes = ['/.well-known/', '/user/']
# just pass through site2.example unmodified
[hosts."site2.example"]
upstream = 'http://localhost:3001'
replace = false