immich
immich copied to clipboard
feat(cli): Use well-known endpoint to resolve API
Deploying with
Cloudflare Pages
| Latest commit: |
fe9bd06
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://ed7790d0.immich.pages.dev |
| Branch Preview URL: | https://feat-cli-well-known.immich.pages.dev |
Would fix #6487, #6731
The fallback logic for constructing the URL is a bit more complex than I'd anticipated. For example, this code currently doesn't handle cases where .well-known returns successfully but builds an invalid endpoint.
I'm not exactly sure what well-known does. Could you summarize the idea here?
The API is served at /api usually, but it you type in the root path / to the mobile app, there is a special endpoint (/.well-known/immich) that can check instead and it returns a response that indicates where the API is actually located. It is like a special discovery endpoint that can be used so the user isn't required to remember to add /api