57e07d9777
echo RealIP — leftmost XFF into its failed-auth log lines. Once traefik trusts the tunnel's fixed address (controller v0.286.0), the leftmost entry is what a stranger writes; with the chain removed the app reads traefik's X-Real-Ip or its peer, as before — never forgeable. Measured on 9202: a router with this middleware receives no X-Forwarded-For (felhom.eu audits/visitors-2026-10-01/A/P1). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
49 lines
1.6 KiB
YAML
49 lines
1.6 KiB
YAML
# OpenGist - Kód snippetek megosztása (GitHub Gist alternatíva)
|
|
# Domain: ${SUBDOMAIN}.${DOMAIN}
|
|
# Database: None (file-based)
|
|
# RAM: ~30M (mem_limit: 128M) | Pi-compatible: Yes
|
|
#
|
|
# Environment variables:
|
|
# DOMAIN - Your domain (e.g., demo-felhom.eu)
|
|
|
|
services:
|
|
opengist:
|
|
image: ghcr.io/thomiceli/opengist:1.15
|
|
container_name: opengist
|
|
restart: unless-stopped
|
|
environment:
|
|
- TZ=Europe/Budapest
|
|
- OG_EXTERNAL_URL=https://${SUBDOMAIN}.${DOMAIN}
|
|
volumes:
|
|
- opengist_data:/opengist
|
|
networks:
|
|
- traefik-public
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 128M
|
|
healthcheck:
|
|
test: ["CMD", "wget", "--spider", "-q", "http://127.0.0.1:6157/healthcheck"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 30s
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.opengist.rule=Host(`${SUBDOMAIN}.${DOMAIN}`)"
|
|
# R-753: this app reads the LEFTMOST X-Forwarded-For entry, which a stranger writes once traefik keeps the
|
|
# tunnel's chain — so its chain is removed here (it then reads traefik's X-Real-Ip or peer; never forgeable).
|
|
- "traefik.http.middlewares.opengist-xff.headers.customrequestheaders.X-Forwarded-For="
|
|
- "traefik.http.routers.opengist.middlewares=opengist-xff"
|
|
- "traefik.http.routers.opengist.entrypoints=websecure"
|
|
- "traefik.http.routers.opengist.tls=true"
|
|
- "traefik.http.routers.opengist.tls.certresolver=letsencrypt"
|
|
- "traefik.http.services.opengist.loadbalancer.server.port=6157"
|
|
|
|
volumes:
|
|
opengist_data:
|
|
|
|
networks:
|
|
traefik-public:
|
|
external: true
|