If the version is part of the URL, you have benefits such as -
1. It's easy to inspect the URL. For headers it's more involved.
2. Middleware (Proxies) can drop headers that they don't recognize.
3. Logging frameworks typically log URLs but don't log headers OOTB.
As someone who has built a lot of APIs for a long time, I think the decision to use headers to communicate versioning information is not optimal.
If the version is part of the URL, you have benefits such as -
1. It's easy to inspect the URL. For headers it's more involved.
2. Middleware (Proxies) can drop headers that they don't recognize.
3. Logging frameworks typically log URLs but don't log headers OOTB.
As someone who has built a lot of APIs for a long time, I think the decision to use headers to communicate versioning information is not optimal.