mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-20 01:36:32 +00:00
Merge pull request #3700 from flec/fix-basic-auth
patch: fix flashing from URL when using basic auth
This commit is contained in:
commit
aba01825a0
@ -315,6 +315,7 @@ export interface SourceMetadata extends sourceDestination.Metadata {
|
|||||||
drive?: DrivelistDrive;
|
drive?: DrivelistDrive;
|
||||||
extension?: string;
|
extension?: string;
|
||||||
archiveExtension?: string;
|
archiveExtension?: string;
|
||||||
|
auth?: Authentication;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface SourceSelectorProps {
|
interface SourceSelectorProps {
|
||||||
@ -529,6 +530,7 @@ export class SourceSelector extends React.Component<
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (metadata !== undefined) {
|
if (metadata !== undefined) {
|
||||||
|
metadata.auth = auth;
|
||||||
selectionState.selectSource(metadata);
|
selectionState.selectSource(metadata);
|
||||||
analytics.logEvent('Select image', {
|
analytics.logEvent('Select image', {
|
||||||
// An easy way so we can quickly identify if we're making use of
|
// An easy way so we can quickly identify if we're making use of
|
||||||
|
@ -291,9 +291,14 @@ ipc.connectTo(IPC_SERVER_ID, () => {
|
|||||||
url: imagePathObject.url,
|
url: imagePathObject.url,
|
||||||
avoidRandomAccess: true,
|
avoidRandomAccess: true,
|
||||||
axiosInstance: axios.create(_.omit(imagePathObject, ['url'])),
|
axiosInstance: axios.create(_.omit(imagePathObject, ['url'])),
|
||||||
|
auth: options.image.auth,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
source = new Http({ url: imagePath, avoidRandomAccess: true });
|
source = new Http({
|
||||||
|
url: imagePath,
|
||||||
|
avoidRandomAccess: true,
|
||||||
|
auth: options.image.auth,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user