Update Nginx Config to support /api/v1/node
Currently, the latest version of headscale the /api/v1/machine endpoint is now /api/v1/node. As such, an additional modification to the nginx config needs to be made until the UI is fully caught up with upstream releases.
location = /api/v1/machine {
return 301 $scheme://$http_host/api/v1/node;
}
Good.
@soudaburger: thanks for the tip!
Would be great to get a small update on headscale-admin that changes the call to the right endpoint though :-D
Ahhhh my bad, I have legacy api enabled in settings appearently. Removing it, brought back all functionality and I also don't see machine call any more. Also not the 301's I saw after applying the nginx fix proposed by @soudaburger.
Keep on the great work!
i quickly came up with something for caddy
@match path_regexp match ^/api/v1/machine(.*)
rewrite @match /api/v1/node{re.match.1}
whoops, turns out that in the settings page you can disable legacy api, which uses the node endpoint instead of the machine endpoint (thanks to @tacognito for pointing that out)
Thank you @tacognito @ElonGaties , I was also confused. I feel like that setting should be on by default since new users (like myself) are more likely to use the latest version of headscale, since we're just starting out.
Thank you, all! I am changing versioning such that the version of headscale-admin tag will equate to the version of headscale that it targets. e.g. the newest stable headscale version (which is 0.23) will be compatible with headscale version 0.23 as well.