electron-builder-http
Advanced tools
Comparing version 15.5.1 to 15.6.2
@@ -136,2 +136,6 @@ declare module "electron-builder-http/out/CancellationToken" { | ||
/** | ||
* The region. Is determined and set automatically when publishing. | ||
*/ | ||
readonly region?: string | null | ||
/** | ||
* The channel. | ||
@@ -138,0 +142,0 @@ * @default latest |
@@ -295,6 +295,5 @@ "use strict"; | ||
// github redirect to amazon s3 - avoid error "Only one auth mechanism allowed" | ||
if (requestOptions.headers != null && (requestOptions.hostname || "").indexOf(".amazonaws.") !== -1) { | ||
if (requestOptions.headers != null && (requestOptions.hostname || "").indexOf(".amazonaws.") !== -1 && requestOptions.headers.Authorization != null && requestOptions.headers.Authorization.startsWith("token ")) { | ||
requestOptions.headers = Object.assign({}, requestOptions.headers); | ||
delete requestOptions.headers.Authorization; | ||
delete requestOptions.headers.authorization; | ||
} | ||
@@ -301,0 +300,0 @@ return requestOptions; |
@@ -12,3 +12,12 @@ "use strict"; | ||
function s3Url(options) { | ||
let url = `https://${options.bucket}.s3.amazonaws.com`; | ||
let url; | ||
if (!(options.bucket.indexOf(".") !== -1)) { | ||
url = `https://${options.bucket}.s3.amazonaws.com`; | ||
} else { | ||
if (!options.region) { | ||
throw new Error(`Bucket name "${options.bucket}" includes a dot, but S3 region is missing`); | ||
} | ||
// special case, see http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro | ||
url = options.region === "us-east-1" ? `https://s3.amazonaws.com/${options.bucket}` : `https://s3-${options.region}.amazonaws.com/${options.bucket}`; | ||
} | ||
if (options.path != null) { | ||
@@ -15,0 +24,0 @@ url += `/${options.path}`; |
{ | ||
"name": "electron-builder-http", | ||
"version": "15.5.1", | ||
"version": "15.6.2", | ||
"main": "out/httpExecutor.js", | ||
@@ -16,5 +16,5 @@ "author": "Vladimir Krivosheev", | ||
"debug": "2.6.3", | ||
"fs-extra-p": "^4.0.2" | ||
"fs-extra-p": "^4.1.0" | ||
}, | ||
"typings": "./out/electron-builder-http.d.ts" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
72389
787
Updatedfs-extra-p@^4.1.0