refactor(server): external domain fallback (#13506)

This commit is contained in:
Jason Rasmussen 2024-10-16 18:13:12 -04:00 committed by GitHub
parent 51d4899cd1
commit 8ac40a933a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 21 additions and 18 deletions

View file

@ -16,6 +16,9 @@ import { ImmichCookie, ImmichHeader } from 'src/dtos/auth.dto';
import { MetadataKey } from 'src/enum';
import { ILoggerRepository } from 'src/interfaces/logger.interface';
export const getExternalDomain = (server: SystemConfig['server'], port: number) =>
server.externalDomain || `http://localhost:${port}`;
/**
* @returns a list of strings representing the keys of the object in dot notation
*/