bugfix on webdav url retreiving
This commit is contained in:
@@ -74,9 +74,12 @@ export interface LeaderLockInfo {
|
||||
/** Redis connection URL (e.g., redis://10.0.1.50:6379) */
|
||||
redisUrl: string;
|
||||
|
||||
/** WebDAV URL for file access */
|
||||
/** WebDAV URL for file access (external, via nginx/HTTPS) */
|
||||
webdavUrl: string;
|
||||
|
||||
/** WebDAV URL for internal container-to-container access (direct to port 9000) */
|
||||
webdavUrlInternal: string;
|
||||
|
||||
/** Timestamp when leadership was acquired */
|
||||
timestamp: number;
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ export interface URLsResponse {
|
||||
apiUrl: string;
|
||||
redisUrl: string;
|
||||
webdavUrl: string;
|
||||
webdavUrlInternal: string;
|
||||
isLeader: boolean;
|
||||
}
|
||||
|
||||
@@ -120,6 +121,7 @@ export class LeaderClient {
|
||||
apiUrl: urls.apiUrl,
|
||||
redisUrl: urls.redisUrl,
|
||||
webdavUrl: urls.webdavUrl,
|
||||
webdavUrlInternal: urls.webdavUrlInternal,
|
||||
timestamp: Date.now(),
|
||||
pid: 0 // Unknown for remote leader
|
||||
};
|
||||
@@ -139,13 +141,22 @@ export class LeaderClient {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get WebDAV URL from leader info
|
||||
* Get WebDAV URL from leader info (external, via nginx/HTTPS)
|
||||
*/
|
||||
async getWebdavUrl(): Promise<string | null> {
|
||||
const info = await this.getLeaderInfo();
|
||||
return info?.webdavUrl ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get internal WebDAV URL from leader info (direct to port 9000)
|
||||
* Use this for container-to-container communication
|
||||
*/
|
||||
async getWebdavUrlInternal(): Promise<string | null> {
|
||||
const info = await this.getLeaderInfo();
|
||||
return info?.webdavUrlInternal ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get meta-core API URL from leader info
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user