-
-
Notifications
You must be signed in to change notification settings - Fork 662
Description
Hello there.
First and foremost thank you very much for you guides and Repo about Home Serving. Followed your steps to traefik+authelia+Cloudflare DNS, etc. Till now with success.
- Wanted to ask you about how to implement Plugins on traefik within your config, because you use Traefik with CLI commands and middleware chains. I have tested until now several plugins, whereby Traefik sees it and loads it without a problem, doesnt report errors around it, but will always fail on all subdomains, where i always have a 404 error.
----> my Middlewares.yml is exactly how you have yours.
----> my Middlewares-chains.yml are very simple:
http:
middlewares:
chain-no-auth:
chain:
middlewares:
- middlewares-rate-limit
- middlewares-https-redirectscheme
- middlewares-secure-headers
- middlewares-compress
chain-basic-auth:
chain:
middlewares:
- middlewares-rate-limit
- middlewares-https-redirectscheme
- middlewares-secure-headers
- middlewares-basic-auth
- middlewares-compress
chain-authelia:
chain:
middlewares:
- middlewares-rate-limit
- middlewares-https-redirectscheme
- middlewares-secure-headers
- middlewares-authelia
- middlewares-compress
- Now from this logic, once i insert the CLI commands on the Docker Compose file with the plugin, i follow the traefik plugin guide, because the majority need a static and a dynamic config. So in tha sense i configure the Middlewares, and call that in the chain, like so:
chain-authelia:
chain:
middlewares:
- middlewares-rate-limit
- middlewares-https-redirectscheme
- middlewares-secure-headers
- middlewares-authelia
- middlewares-compress
- my-geoblock
where i add the new middleware to the chain. I recreate the container with this configuration:
static:
--experimental.plugins.geoblock.modulename=github.com/PascalMinder/geoblock
--experimental.plugins.geoblock.version=v0.2.5
dynamic:
http:
middlewares:
my-geoblock:
plugin:
geoblock:
allowLocalRequests: "false"
allowUnknownCountries: "false"
api: https://get.geojs.io/v1/ip/country/{ip}
apiTimeoutMs: "150"
cacheSize: "15"
countries:
- CH
forceMonthlyUpdate: "true"
logAllowedRequests: "false"
logApiRequests: "true"
logLocalRequests: "false"
unknownCountryApiResponse: nil
and ofc i call the dynamic on the chain.
It doesnt work no matter what i try. The plugin here is only an example.
This happens with every Plugin. As i said no error comes out of traefik itself and the plugin is loaded without a problem.
I would ask you, if and when you got the time, to make a guide with the new crowdsec plugin for traefik, where the traefik-bouncer is configured as a plugin. That one would be of interest given that the one mentioned in your guide no longer shows as stable by traefik.