mirror of
https://github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin.git
synced 2026-07-21 11:38:59 +02:00
Clean docker-compose, add test data in .traefik
This commit is contained in:
+6
-4
@@ -4,9 +4,11 @@ iconPath: .assets/icon.png
|
|||||||
|
|
||||||
import: github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin
|
import: github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin
|
||||||
|
|
||||||
summary: 'Add Request Header'
|
summary: 'Crowdsec Bouncer Traefik Plugin'
|
||||||
|
|
||||||
testData:
|
testData:
|
||||||
Headers:
|
crowdsec:
|
||||||
X-Demo: test
|
bouncer:
|
||||||
X-URL: '{{URL}}'
|
enabled: true
|
||||||
|
crowdseclapikey: 40796d93c2958f9e58345514e67740e5
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -6,10 +6,10 @@ import (
|
|||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin"
|
crowdsec_bouncer_traefik_plugin "github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestDemo(t *testing.T) {
|
func TestCrowdSec(t *testing.T) {
|
||||||
cfg := crowdsec_bouncer_traefik_plugin.CreateConfig()
|
cfg := crowdsec_bouncer_traefik_plugin.CreateConfig()
|
||||||
cfg.CrowdsecLapiKey = "caca"
|
cfg.CrowdsecLapiKey = "caca"
|
||||||
|
|
||||||
|
|||||||
+3
-5
@@ -29,11 +29,9 @@ services:
|
|||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.http.routers.whoami.rule=Host(`localhost`)"
|
- "traefik.http.routers.whoami.rule=Host(`localhost`)"
|
||||||
- "traefik.http.routers.whoami.entrypoints=web"
|
- "traefik.http.routers.whoami.entrypoints=web"
|
||||||
- "traefik.http.routers.whoami.middlewares=testo@docker"
|
- "traefik.http.routers.whoami.middlewares=crowdsec@docker"
|
||||||
- "traefik.http.middlewares.testo.plugin.bouncer.enabled=true"
|
- "traefik.http.middlewares.crowdsec.plugin.bouncer.enabled=true"
|
||||||
- "traefik.http.middlewares.testo.plugin.bouncer.crowdseclapikey=40796d93c2958f9e58345514e67740e5"
|
- "traefik.http.middlewares.crowdsec.plugin.bouncer.crowdseclapikey=40796d93c2958f9e58345514e67740e5"
|
||||||
# - "traefik.http.routers.whoami.middlewares=blacklist@docker"
|
|
||||||
# - "traefik.http.middlewares.blacklist.ipblacklist.sourcerange=127.0.0.1/32, 192.168.1.7"
|
|
||||||
|
|
||||||
crowdsec:
|
crowdsec:
|
||||||
image: crowdsecurity/crowdsec:v1.4.1
|
image: crowdsecurity/crowdsec:v1.4.1
|
||||||
|
|||||||
Reference in New Issue
Block a user