patch: fix flashing from URL when using basic auth

This commit is contained in:
Marco Füllemann 2022-02-04 14:28:00 +01:00 committed by flec
parent 03ee428039
commit a6f6cd4a19
2 changed files with 8 additions and 1 deletions

View File

@ -315,6 +315,7 @@ export interface SourceMetadata extends sourceDestination.Metadata {
drive?: DrivelistDrive;
extension?: string;
archiveExtension?: string;
auth?: Authentication;
}
interface SourceSelectorProps {
@ -529,6 +530,7 @@ export class SourceSelector extends React.Component<
}
if (metadata !== undefined) {
metadata.auth = auth;
selectionState.selectSource(metadata);
analytics.logEvent('Select image', {
// An easy way so we can quickly identify if we're making use of

View File

@ -291,9 +291,14 @@ ipc.connectTo(IPC_SERVER_ID, () => {
url: imagePathObject.url,
avoidRandomAccess: true,
axiosInstance: axios.create(_.omit(imagePathObject, ['url'])),
auth: options.image.auth,
});
} else {
source = new Http({ url: imagePath, avoidRandomAccess: true });
source = new Http({
url: imagePath,
avoidRandomAccess: true,
auth: options.image.auth,
});
}
}
}