-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
What problem will this feature address?
The problem is that if a user manually inputs a domain name and accidentally includes a trailing whitespace (e.g., example.com instead of example.com), Dokploy passes this whitespace into the Traefik Host() rule.
This results in the following issues:
The Traefik router fails to match the actual domain name requested by the browser.
Users receive a 404 Page Not Found error from Traefik when accessing the domain (e.g., https://example.com/).
The issue is hard to diagnose because the whitespace is invisible in the configuration file or the UI.
Describe the solution you'd like
I would like the domain assignment logic in Dokploy to automatically trim (remove leading and trailing whitespace) from the domain input string before it is written to any Traefik configuration files (like dokploy.yml or Traefik dynamic configuration).
This should apply specifically to the Host() rule generation for routers.
Example of desired behavior: If the user input is: "example.com " The generated Traefik rule should be: Host(\example.com)
Describe alternatives you've considered
1. Manual User Correction: This is the current workaround, requiring the user to manually inspect configuration files or the Dokploy UI very closely to spot and remove the accidental space. This is prone to error and frustration.
2. Validation Check: Implementing a validation check that warns the user if trailing whitespace is detected in the domain input field. While better than nothing, automatically trimming the input is a smoother and more robust user experience fix.
Additional context
No response
Will you send a PR to implement it?
Yes