feat(.well-known): add .well-known/immich to reference API endpoint

This commit is contained in:
Connery Noble
2023-01-11 17:30:01 -08:00
parent b9b2b559a1
commit 6962df6340
14 changed files with 119 additions and 23 deletions

View File

@@ -54,9 +54,17 @@ class ImmichApi {
public setBaseUrl(baseUrl: string) {
this.config.basePath = baseUrl;
}
public getBaseUrl() {
return this.config.basePath;
}
}
// Browser side (public) API client
export const api = new ImmichApi();
api.setBaseUrl(env.PUBLIC_IMMICH_SERVER_PUBLIC_URL || '/api');
// Server side API client
export const serverApi = new ImmichApi();
const immich_server_url = env.PUBLIC_IMMICH_SERVER_URL || 'http://immich-server:3001';
serverApi.setBaseUrl(immich_server_url);