mirror of
https://github.com/CyberMind-FR/secubox-deb.git
synced 2026-07-29 18:36:55 +00:00
- WAF API: Replace ipapi.co HTTP calls with local GeoLite2-Country.mmdb - CrowdSec frontend: Use backend /api/v1/waf/geoip/ instead of ipapi.co - nginx: Add routes for /system/ and /api/v1/system/ - Avoids CORS issues and rate limiting from remote GeoIP services Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
59 lines
1.4 KiB
Plaintext
59 lines
1.4 KiB
Plaintext
server {
|
|
listen 0.0.0.0:9080;
|
|
root /usr/share/secubox/www;
|
|
index index.html;
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
location /api/ {
|
|
proxy_pass http://127.0.0.1:8001;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
}
|
|
|
|
location /shared/ {
|
|
alias /usr/share/secubox/www/shared/;
|
|
}
|
|
|
|
# CrowdSec Dashboard static files
|
|
location /crowdsec/ {
|
|
alias /usr/share/secubox/www/crowdsec/;
|
|
index index.html;
|
|
try_files $uri $uri/ /crowdsec/index.html;
|
|
}
|
|
|
|
# CrowdSec API proxy
|
|
location /api/v1/crowdsec/ {
|
|
proxy_pass http://unix:/run/secubox/crowdsec.sock:/;
|
|
include /etc/nginx/snippets/secubox-proxy.conf;
|
|
}
|
|
|
|
# WAF Dashboard static files
|
|
location /waf/ {
|
|
alias /usr/share/secubox/www/waf/;
|
|
index index.html;
|
|
try_files $uri $uri/ /waf/index.html;
|
|
}
|
|
|
|
# WAF API proxy
|
|
location /api/v1/waf/ {
|
|
proxy_pass http://unix:/run/secubox/waf.sock:/;
|
|
include /etc/nginx/snippets/secubox-proxy.conf;
|
|
}
|
|
|
|
# System Hub Dashboard static files
|
|
location /system/ {
|
|
alias /usr/share/secubox/www/system/;
|
|
index index.html;
|
|
try_files $uri $uri/ /system/index.html;
|
|
}
|
|
|
|
# System Hub API proxy
|
|
location /api/v1/system/ {
|
|
proxy_pass http://unix:/run/secubox/system.sock:/;
|
|
include /etc/nginx/snippets/secubox-proxy.conf;
|
|
}
|
|
}
|