mirror of
https://github.com/immich-app/immich.git
synced 2025-12-23 01:11:36 +03:00
fix(server): add basic auth support (#16740)
* "add basic auth support" * "fix format" * fix: lint --------- Co-authored-by: Elliot <elliot@elliotbrandwein.com> Co-authored-by: Jason Rasmussen <jason@rasm.me>
This commit is contained in:
@@ -116,7 +116,14 @@ const buildConfig = async (repos: RepoDeps) => {
|
||||
const config = instanceToPlain(instance) as SystemConfig;
|
||||
|
||||
if (config.server.externalDomain.length > 0) {
|
||||
config.server.externalDomain = new URL(config.server.externalDomain).origin;
|
||||
const domain = new URL(config.server.externalDomain);
|
||||
|
||||
let externalDomain = domain.origin;
|
||||
if (domain.password && domain.username) {
|
||||
externalDomain = `${domain.protocol}//${domain.username}:${domain.password}@${domain.host}`;
|
||||
}
|
||||
|
||||
config.server.externalDomain = externalDomain;
|
||||
}
|
||||
|
||||
if (!config.ffmpeg.acceptedVideoCodecs.includes(config.ffmpeg.targetVideoCodec)) {
|
||||
|
||||
Reference in New Issue
Block a user