Preview routers don't inherit source app @file middlewares and tls.options
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 37.4k
- Forks
- 3k
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 73
Description
Summary
Preview deployments generate a separate Traefik dynamic file, but preview websecure routers do not inherit source app @file middlewares and tls.options.
Why this matters
Many setups attach security and edge constraints as global file middlewares and TLS options (for example: Cloudflare-only middleware and specific client auth options). Those are present on the main app router but missing on the preview router, so previews can behave differently or fail behind hardened ingress setups.
Current behavior
- Source app
websecurerouter has@filemiddlewares andtls.options - Preview router is generated without inheriting those settings
- Result: security mismatch between prod/app and preview routes
Expected behavior
When creating preview websecure routers, Dokploy should inherit source app websecure:
middlewaresentries ending with@filetls.options
unless explicitly overridden in preview-specific logic.
Notes
This keeps preview behavior aligned with source app security defaults and avoids manual post-generation patching on every preview deployment.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the preview dynamic-file generation and the code that builds preview websecure routers, then compare it with the source app router configuration. Trace how @file middlewares and tls.options are represented and inherited. Done means generated preview websecure routers retain those source settings unless preview-specific logic overrides them, with relevant tests or configuration checks passing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100