docker modsecurity

This commit is contained in:
Vomitblood 2025-01-14 21:08:26 +08:00
parent de2a35905e
commit 22f312cbb9
8 changed files with 1468 additions and 819 deletions

View file

@ -1 +1,2 @@
nodejs 23.1.0 nodejs 23.1.0
bun 1.1.43

Binary file not shown.

2235
client/package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -15,17 +15,12 @@
{ {
"allow": [ "allow": [
{ {
"url": "http://*" "url": "http://*:*"
},
{
"url": "https://*"
},
{
"url": "http://localhost:5000"
} }
], ],
"identifier": "http:default" "identifier": "http:default"
} },
"http:default"
], ],
"windows": [ "windows": [
"main" "main"

View file

@ -10,7 +10,7 @@ export const ServerUrlInput = () => {
<TextField <TextField
fullWidth fullWidth
label="Backend server URL" label="Backend server URL"
// onChange={(event) => setServerUrl(event.target.value)} onChange={(event) => setServerUrl(event.target.value)}
size="small" size="small"
value={serverUrl} value={serverUrl}
/> />

19
docker/modsecurity/README Normal file
View file

@ -0,0 +1,19 @@
docker run -it --rm \
-p 8080:8080 \
--add-host host.docker.internal:host-gateway \
-e BACKEND="http://host.docker.internal:5000" \
-e SERVER_NAME=localhost \
-e PORT=8080 \
owasp/modsecurity-crs:apache
docker run \
-ti \
-p 8080:8080 \
--rm \
-v /tmp/host-fs-auditlog.log:/var/log/modsec_audit.log \
-v /tmp/host-fs-errorlog.log:/var/log/modsec_error.log \
-e MODSEC_AUDIT_ENGINE=on \
-e MODSEC_AUDIT_LOG=/var/log/modsec_audit.log \
-e LOGLEVEL=warn \
-e ERRORLOG=/var/log/modsec_error.log \
owasp/modsecurity-crs:apache

View file

@ -0,0 +1,19 @@
services:
modsecurity:
image: owasp/modsecurity-crs:apache
container_name: modsecurity
restart: always
ports:
- "8080:8080"
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
BACKEND: "http://host.docker.internal:5000"
SERVER_NAME: "localhost"
PORT: "8080"
networks:
- modsec-network
networks:
modsec-network:
driver: bridge