Skip to content

Commit

Permalink
do not modify authorization header in proxyless mode (#2867)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexKamaev authored Mar 27, 2023
1 parent 70b7e95 commit f334fc7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "testcafe-hammerhead",
"description": "A powerful web-proxy used as a core for the TestCafe testing framework (https://github.com/DevExpress/testcafe).",
"version": "30.0.0",
"version": "30.1.0",
"homepage": "https://github.com/DevExpress/testcafe-hammerhead",
"bugs": {
"url": "https://github.com/DevExpress/testcafe-hammerhead/issues"
Expand Down
2 changes: 1 addition & 1 deletion src/client/sandbox/xhr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ export default class XhrSandbox extends SandboxBaseWithDelayedSettings {
});

overrideFunction(xmlHttpRequestProto, 'setRequestHeader', function (this: XMLHttpRequest, ...args: Parameters<XMLHttpRequest['setRequestHeader']>) {
if (isAuthorizationHeader(args[0]))
if (!xhrSandbox.proxyless && isAuthorizationHeader(args[0]))
args[1] = addAuthorizationPrefix(args[1]);

nativeMethods.xhrSetRequestHeader.apply(this, args);
Expand Down

0 comments on commit f334fc7

Please sign in to comment.