Skip to content

feat: enable database tracking and harden request routing#1

Merged
0xPuncker merged 1 commit into
mainfrom
0xPuncker/enable-database-tracking
May 17, 2026
Merged

feat: enable database tracking and harden request routing#1
0xPuncker merged 1 commit into
mainfrom
0xPuncker/enable-database-tracking

Conversation

@0xPuncker
Copy link
Copy Markdown
Owner

@0xPuncker 0xPuncker commented May 17, 2026

Summary

  • Wires DATABASE_URL into docker-compose.yml and copies prisma.config.ts to the production Docker image so the usage tracker can connect to PostgreSQL at runtime
  • Replaces the hardcoded Windows-specific credential volume path with the portable ~/.claude/.credentials.json
  • Adds a 404 guard in the request handler that rejects non-API paths (e.g. browser favicon/asset requests) before they reach the provider chain

Test plan

  • Run docker compose up and verify the proxy connects to cc-db without errors
  • Confirm /health, /config, /providers, /usage, and /logs endpoints still respond correctly
  • Confirm requests to non-API paths (e.g. /favicon.ico) return 404 instead of being forwarded to the provider

Wire DATABASE_URL into docker-compose and copy prisma.config.ts to the
production Docker image so the usage tracker can reach PostgreSQL at runtime.
Replace the hardcoded Windows credential path with the portable ~/
equivalent. Add a 404 guard in the request handler to reject non-API
paths (e.g. browser asset requests) before they reach the provider chain.
@0xPuncker 0xPuncker merged commit 3d8fbbd into main May 17, 2026
2 checks passed
@0xPuncker 0xPuncker deleted the 0xPuncker/enable-database-tracking branch May 17, 2026 16:22
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