Dokploy / Dokploy/dokploy

Preview routers don't inherit source app @file middlewares and tls.options

Open
#3,638 0 comments 0 reactions 0 assignees View on GitHub

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 websecure router has @file middlewares and tls.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:

  • middlewares entries ending with @file
  • tls.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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.