Skip to content

Commit

Permalink
Fixed FetchRequest when using credentials (#3897).
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Mar 24, 2023
1 parent c05a84a commit 88e8124
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src.ts/utils/geturl-browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export async function getUrl(req: FetchRequest, _signal?: FetchCancelSignal): Pr
operation: "request"
});

assert(!req.credentials || req.allowInsecureAuthentication, "insecure authorized connections unsupported", "UNSUPPORTED_OPERATION", {
assert(protocol === "https" || !req.credentials || req.allowInsecureAuthentication, "insecure authorized connections unsupported", "UNSUPPORTED_OPERATION", {
operation: "request"
});

Expand Down
2 changes: 1 addition & 1 deletion src.ts/utils/geturl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export async function getUrl(req: FetchRequest, signal?: FetchCancelSignal): Pro
operation: "request"
});

assert(!req.credentials || req.allowInsecureAuthentication, "insecure authorized connections unsupported", "UNSUPPORTED_OPERATION", {
assert(protocol === "https" || !req.credentials || req.allowInsecureAuthentication, "insecure authorized connections unsupported", "UNSUPPORTED_OPERATION", {
operation: "request"
});

Expand Down

0 comments on commit 88e8124

Please sign in to comment.