Motiejus Jakštys c6336adb01
config: loosen up BaseDomain and ServerURL checks (#2248)
* config: loosen up BaseDomain and ServerURL checks

Requirements [here][1]:

> OK:
> server_url: headscale.com, base: clients.headscale.com
> server_url: headscale.com, base: headscale.net
>
> Not OK:
> server_url: server.headscale.com, base: headscale.com
>
> Essentially we have to prevent the possibility where the headscale
> server has a URL which can also be assigned to a node.
>
> So for the Not OK scenario:
>
> if the server is: server.headscale.com, and a node joins with the name
> server, it will be assigned server.headscale.com and that will break
> the connection for nodes which will now try to connect to that node
> instead of the headscale server.

Fixes #2210

[1]: https://github.com/juanfont/headscale/issues/2210#issuecomment-2488165187

* server_url and base_domain: re-word error message, fix a one-off bug and add a test case for the bug.

* lint

* lint again
2024-11-22 13:21:44 +01:00
..
2023-09-05 08:47:43 +02:00
2024-10-23 10:45:59 -05:00
2024-09-09 14:10:22 +02:00
2024-10-02 14:50:17 +02:00
2024-11-06 15:59:38 +01:00
2024-10-02 14:50:17 +02:00
2024-10-02 14:50:17 +02:00
2024-11-06 15:59:38 +01:00
2024-10-23 10:45:59 -05:00
2024-10-02 14:50:17 +02:00
2024-10-02 14:50:17 +02:00