From what I remember that config value is mostly used for the user management emails.
If you wanted to use n8neditor.mydomain.com for the editor it should be a case of setting everything apart from the webhook url to that value then updating your dns records as needed.
Yes, but I do not know how that 2 env have 2 subdomain could point to the same ip address at port 5678. It seems n8n could use the same address for 2 subdomain, isn’t it?
On your DNS or Reverse proxy you would need to set a new A record that points the hostname to the internal host and that should take care of it.
Exact instructions are a bit tricky as there are hundreds of way this could be done depending on what you are using for routing and how your DNS is managed.
n8n itself doesn’t really listen for connections on a specific host it is more what it displays in the front end and what it reports to the outside world.
Looking at your env example from an n8n side all you would need to do is something like the below then just make sure you are pointing the dns records to the correct location and you should be all good.
This won’t fully restrict the admin interface to just n8neditor.mydomain.com though to do that you would need to look at implementing network rules to prevent some of the URI paths from being loaded.
You can point it to 5678 if you want, It depends on if it is listening on that port or not. To be honest though unless you are going to restrict paths so making sure only n8n.mydomain.com/webhook can go through you will still be able to access the editor on both URLs.
It could be worth a feature request although I am not sure it would actually help to prevent brute forcing the webhook URLs as you would be using the webhook url for other services to talk to.
We are always open to feature requests though and if the request idea is popular with the community it will have a higher chance of being added.