mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00: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:
parent
e5219f1f31
commit
fdc7a154c0
2 changed files with 13 additions and 1 deletions
|
|
@ -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)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue