Closed skyguy2002 closed 4 months ago
I figured it out myself, the mode must be set to stream, otherwise it won't work
Hi @skyguy2002,
Sorry for the delay,
From the README, the mode none and stream works the following: |
Mode | Description |
---|---|---|
none | If the client IP is on ban list, it will get a http code 403 response. Otherwise, request will continue as usual. All request call the Crowdsec LAPI |
... | stream | Stream Streaming mode allows you to keep in the local cache only the Banned IPs, every requests that does not hit the cache is authorized. Every minute, the cache is updated with news from the Crowdsec LAPI. | ...
What I think is that you might have had a configuration issue.
Because in none
mode, every request is sent to the LAPI for a verificatiob of the IP, if you cannot reach LAPI, or if LAPI auth is denied then it can cause 403 even if no decisions exists.
I'm not sure how stream
mode would have resolved it.
However, if you want we can check that your setup is done correctly:
I would just need Traefik middleware debug logs (from start) and maybe corresponding logs from Crowdsec to see the Stream exchanges).
You may activate debug logs in the plugin with logLevel: DEBUG
.
Best,
that was absolutely my mistake, however i had imported the same plugin twice under two names, this made the whole middleware file invalid or that's why traefik ignored the whole midddleware, looked once in the log and everything worked immediately. Thanks!
Alright thanks for the feedback! I'm closing this now
Describe the bug 🐛 As soon as I activate the middleware, I no longer have access to the page, although nothing is displayed according to the “cscli decisions list”
Expected behavior 👀 Actually, since my IP is not blocked, I should have access
Context 🔎 Middleware file:
Service file:
Version (please complete the following information):
To Reproduce Steps to reproduce the behavior: