maxlerebourg / crowdsec-bouncer-traefik-plugin

Traefik plugin for Crowdsec - WAF and IP protection

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[FEATURE] Custom HTML error page integration on 403 (like Captcha but for ban)

Kuppit opened this issue · comments

Is your feature request related to a problem? Please describe. 🐛
When a user is banned and receives a 403 Forbidden response, the lack of a customizable error page limits the ability to provide a more user-friendly or informative experience.

Describe the solution you'd like
I propose enhancing the flexibility in handling 403 responses by allowing the integration of a custom HTML template, similar to #121. This approach would enable the presentation of a custom HTML error page for bans, using a variable (e.g., banTemplateFile) to specify the path to the HTML file. The idea is to mirror the captcha integration method, where the captchaTemplateFile variable determines the template to be displayed during captcha challenges. By doing this, based on the type of remediation action—be it a captcha challenge or a ban—the appropriate template (captcha or ban) would be displayed to the user.

This solution would significantly enhance user experience by providing clear, actionable information or guidance specific to the reason for the ban, all while maintaining a cohesive brand experience across different types of security responses.

Hi,

Thanks for using the plugin.
I believe this is duable, we'll keep you updated on the progress.

Best,

Thanks for developping this great plugin.

Do you think it will be feasible to have by default this page when you'll do it ?
image

Regards,

Thanks for developping this great plugin.

Do you think it will be feasible to have by default this page when you'll do it ? image

Regards,

Hey,

Yes I think so because we already use a similar template for the captcha feature.
Take a look at the branch.
Once its release should be easy to do the same.
The choice of the template will be up to the user.

Regards