-
Notifications
You must be signed in to change notification settings - Fork 12
Examples
Ethan Leisinger edited this page Apr 17, 2022
·
6 revisions
Add the following to your static traefik config.
pilot:
token = "xxxx" # Update to your pilot token
experimental:
plugins:
rewrite-body:
modulename: "github.com/packruler/rewrite-body"
version: "v0.5.1"# We are able to utilize Go templates (https://pkg.go.dev/text/template) in here which can make defining these much easier
# You can add the following line (including the comment flag (`#`) so YAML processing doesn't freak out
# {{ $theme := "nord" }}
http:
middlewares:
sonarr-theme:
plugin:
rewrite-body:
rewrites:
- regex: </head>
# Now we can reference that variable in our regex replacement for easy consistency
replacement: <link rel="stylesheet" type="text/css" href="https://theme-park.dev/css/base/sonarr/{{ $theme }}.css"></head>In the above example you can set the environment variable THEME to the name of the theme you want to use. Update sonarr to match the app base.
http:
middlewares:
theme-headers:
headers:
customRequestHeaders:
accept-encoding: gzip;1.0,deflate;0.5,identity;0.1This is an example of how to set request headers to prioritize supported encoding. Brotli support is technically included but is not reliable yet.