-
-
Notifications
You must be signed in to change notification settings - Fork 796
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Traefik? #42
Comments
Hi. Sorry I haven't found a way to do subfiltering with træfik yet. I would ask the dvs if they have some similar function. Or use the better web server..nginx :P |
@Mbarmem see if you can get this working https://pilot.traefik.io/plugins/276809785011077632/rewrite-body |
Note to self: Doesn't work with the current implementation of the traefik plugin. |
It seems that traefik/plugin-rewritebody#12 no longer causes issues with injecting styles. However traefik/plugin-rewritebody#13 causes the plugin to fail for some containers. (ETA: I've just spent a bit more time playing around with this minimal example and I'm not getting the Of the containers I've tried, these work:
and these don't:
Here's a minimal example for Portainer using the Docker config provider: version: "3"
services:
traefik:
image: traefik
ports:
- 80:80
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
command:
- --providers.docker=true
- --pilot.token=${TOKEN}
- --experimental.plugins.rewrite.modulename=github.com/traefik/plugin-rewritebody
- --experimental.plugins.rewrite.version=v0.3.1
portainer:
image: portainer/portainer
labels:
- traefik.http.routers.portainer.rule=Host(`portainer.localhost`)
- traefik.http.routers.portainer.middlewares=portainer
- traefik.http.middlewares.portainer.plugin.rewrite.rewrites.regex=</head>
- traefik.http.middlewares.portainer.plugin.rewrite.rewrites.replacement=<link rel="stylesheet" type="text/css" href="https://gilbn.github.io/theme.park/CSS/themes/portainer/${THEME}.css"></head> |
@IntermittentlyRupert btw there are some docker mods you can now use to apply the themes with. (Only for linuxserver) https://github.com/gilbN/theme.park/wiki/Setup#docker-mods |
@GilbN Oh, that's awesome! Between the Docker mods and the Traefik rewrite plugin, the only app I use that I can't inject styles for is Organizr, and that supports custom CSS. |
Yeah. I didnt crate any mods for apps that support custom css. And organizr has my themes in the marketplace too. 👍🏻 |
Sorry for highjacking this. But do you have a rewrite example for Qbittorrent? I was able to get the themes to working with Stylus + Middleware for the headers needed to hide. I tried this one:
But no luck. Any help would be appreciated For anyone wondering how to hide the headers with traefik, this is what I got.
|
@beloso If the rest of your Traefik config is working, my guess would be that this is probably caused by one of the plugin-rewritebody bugs from my earlier comment. Your best bet would probably be to contribute a Docker Mod for Qbittorrent and use that. They're a lot more stable and easier to work with than trying to get plugin-rewritebody to play nice. |
I researched a bit on doing a Mod, but I can't seem to find the default |
Yeah I didn't find the correct html file either. |
I've opened #148 for this and added some additional notes. |
FYI I recently released a plugin that began as a fork of traefik/plugin-rewritebody. It is now publicly available here: packruler/rewrite-body. Check out the Examples page in the wiki for a quick example for implementation of the plugin. |
Awesome! Thanks for creating this! |
I found that plug-in yesterday. I’ll give it a go this week. |
@packruler Great plugin! Can you tell me how the dynamic env var works? Thanks. |
Yeah if you're using docker you can add |
Actually I just found a better way to do it! At the top of your dynamic yaml definition you can add |
I guess we can close this now? @packruler added some instructions here too: https://docs.theme-park.dev/setup/#traefik |
I have not heard of any issues yet. |
Hi,
Is their any way to install the theme via Traefik reverse proxy?
I am asking since i see guides for Apache and Caddy.
The text was updated successfully, but these errors were encountered: