Skip to content

Commit 344bb23

Browse files
fix: specify protocol as https to complete proxy support fix (#6516)
Explicitly set the protocol to https on the request objects to allow publishing to work from behind a proxy server when the https_proxy environment variable is set. Closes #6286
1 parent b81ec0c commit 344bb23

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.changeset/shiny-kangaroos-juggle.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"electron-publish": patch
3+
---
4+
5+
fix: Explicitly set the protocol to https on the request objects to allow publishing to work from behind a proxy server when the https_proxy environment variable is set.

packages/electron-publish/src/gitHubPublisher.ts

+2
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ export class GitHubPublisher extends HttpPublisher {
182182
.doApiRequest(
183183
configureRequestOptions(
184184
{
185+
protocol: parsedUrl.protocol,
185186
hostname: parsedUrl.hostname,
186187
path: parsedUrl.path,
187188
method: "POST",
@@ -263,6 +264,7 @@ export class GitHubPublisher extends HttpPublisher {
263264
httpExecutor.request(
264265
configureRequestOptions(
265266
{
267+
protocol: baseUrl.protocol,
266268
hostname: baseUrl.hostname,
267269
port: baseUrl.port as any,
268270
path: this.info.host != null && this.info.host !== "github.com" ? `/api/v3${path.startsWith("/") ? path : `/${path}`}` : path,

0 commit comments

Comments
 (0)