Skip to content

Close the same access-log leak in the config that ships in the image - #76

Merged
Flatts3000 merged 2 commits into
mainfrom
fix-dev-nginx-access-log
Aug 30, 2026
Merged

Flatts3000 merged 2 commits into
mainfrom
fix-dev-nginx-access-log

Conversation

@Flatts3000

Copy link
Copy Markdown
Owner

The same leak #75 fixed in production, in the config that ships in the image.

frontend/nginx.conf had no access_log directive, so it inherited nginx's stock format - which ends with $http_user_agent and $http_x_forwarded_for. The root docker-compose.yml runs the frontend image with no bind mount, so that config is the one actually serving there, and every page load recorded who was asking.

CLAUDE.md rules that out in as many words: no tracking of who browses the public directory, no IP logging on anonymous routes.

This is the same drift the /deck header block guards against, and the comment says so: production bind-mounts deploy/nginx.prod.conf over this file, so this copy never serves a real visitor - but if the two disagree, the protection disappears the moment that mount is dropped.

Verified the same way as #75, by request rather than by reading. GET /deck/ with X-Forwarded-For: 203.0.113.55 and a distinctive user agent:

[30/Aug/2026:18:22:14 +0000] "GET /deck/ HTTP/1.1" 200 1147551 0.000

Zero identifying strings in the log, against two before the change.

`frontend/nginx.conf` had no `access_log` directive, so it inherited nginx's stock format - which ends with `$http_user_agent` and `$http_x_forwarded_for`. The root `docker-compose.yml` runs the frontend image with **no bind mount**, so that config is the one actually serving there, and every page load recorded who was asking.

CLAUDE.md rules that out in as many words: no tracking of who browses the public directory, no IP logging on anonymous routes.

This is the same drift the `/deck` header block guards against, and the comment says so: production bind-mounts `deploy/nginx.prod.conf` over this file, so this copy never serves a real visitor - but if the two disagree, the protection disappears the moment that mount is dropped.

Verified the same way as #75, by request rather than by reading. `GET /deck/` with `X-Forwarded-For: 203.0.113.55` and a distinctive user agent:

```
[30/Aug/2026:18:22:14 +0000] "GET /deck/ HTTP/1.1" 200 1147551 0.000
```

Zero identifying strings in the log, against two before the change.
The comment claimed the log carries nothing identifying, which is true of the
access log and not of the error log beside it. Verified: an upstream refusing a
connection writes 'client: 172.17.0.1' on every error-level event.

Production is largely insulated - nginx only ever sees Caddy's container address
there - but the root docker-compose.yml publishes the frontend directly on 3001,
so client: is the real peer for anyone running the stack locally.

Both configs now say what the claim covers, and #77 tracks the error log and the
fact that neither compose file rotates anything.
@Flatts3000
Flatts3000 merged commit f01ac7e into main Aug 30, 2026
12 checks passed
@Flatts3000
Flatts3000 deleted the fix-dev-nginx-access-log branch August 30, 2026 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant