mirror of
https://github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin.git
synced 2026-07-19 18:52:20 +02:00
* Add parameter to configure Ban Response Content-Type * Add testing for new BanResponseContentType parameter * Ensure there is a fallback to default Content-Type is user provided empty value * Set Content-Type even if banTemplate is nil * Add more edge cases for testing ban response Content-Type * Add CR/LF validation for BanResponseContentType * Add CaptchaResponseContentType to allow separate Content-Type configuration for captcha responses * Add testing for new CaptchaResponseContentType * Update README * Split nil and CR/LF response Content-Type value validation into separate function * Throw error instead of setting the default in case of empty parameter declaration * Update testing accordingly * ✨ remove HTML from var name, add tests and infer content type from filePath * 🍱 fix lint ? * 🍱 fix lint * 🍱 fix lint * 🍱 fix lint + naming * 🍱 fix lint * 🍱 fuck lint --------- Co-authored-by: maxlerebourg <maxlerebourg@gmail.com>
30 lines
739 B
YAML
30 lines
739 B
YAML
http:
|
|
routers:
|
|
r:
|
|
rule: "PathPrefix(`/foo`)"
|
|
entryPoints:
|
|
- web
|
|
service: backend
|
|
middlewares:
|
|
- bouncer
|
|
services:
|
|
backend:
|
|
loadBalancer:
|
|
servers:
|
|
- url: "@@BACKEND_URL@@"
|
|
middlewares:
|
|
bouncer:
|
|
plugin:
|
|
bouncer:
|
|
enabled: "true"
|
|
crowdsecMode: stream
|
|
updateIntervalSeconds: "2"
|
|
crowdsecLapiScheme: http
|
|
crowdsecLapiHost: "@@LAPI_HOST@@"
|
|
crowdsecLapiKey: "@@APIKEY@@"
|
|
forwardedHeadersTrustedIps:
|
|
- "127.0.0.1/32"
|
|
banFilePath: "@@SCENARIO_DIR@@/ban.json"
|
|
remediationHeadersCustomName: "X-E2E-Remediation"
|
|
traceHeadersCustomName: x-trace
|