DevExpress / testcafe-hammerhead

A powerful web-proxy used as a core for the TestCafe testing framework. :hammer: :smiley:
https://testcafe.io
MIT License
171 stars 162 forks source link

Testcafe adding Prefix to Authorization header for no specific reason #2690

Closed franciscolosardo closed 3 years ago

franciscolosardo commented 3 years ago

What is your Scenario?

We're using a token sent as uri parameter to our website. But when the website makes an xhr request, testcafe is adding the prefix : ~~~TestCafe added this prefix to control the authorization flow~~~TOKEN_XXXXX

What is the Current behavior?

Testcafe is adding an unnecessary prefix. This used to work properly a month ago. I located the lines where the prefix is added in testcafe-hammercode's src :

https://github.dev/DevExpress/testcafe-hammerhead/blob/a9fbf7746ff347f7bdafe1f80cf7135eeac21e34/src/client/sandbox/fetch.ts#L61-L61

What is the Expected behavior?

I believe this prefix shouldn't be added to this request.

What is your public web site URL?

Not shareable

Your website URL (or attach your complete example):

Your complete app code (or attach your test files): ```js We're using a simple fetch with the header Authorization. ```

Your Environment details:

github-actions[bot] commented 3 years ago

Thank you for submitting this issue. Since you are using an outdated version of TestCafe, we recommend you update TestCafe to the latest version to check if this issue has been addressed. We constantly improve our tools, and there is a chance that this issue has been already resolved and/or is no longer reproducible in the latest version. We look forward to your response.

no-response[bot] commented 3 years ago

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.

ImanMh commented 1 year ago

This should not happen when using --experimental-proxyless right? But I'm running proxyless and still get this header which causes my tests to fail.

AlexKamaev commented 1 year ago

Hi @ImanMh,

The issue is specific to the proxyless mode. We fixed the issue in the latest rc version. Please try to run your test using the https://github.com/DevExpress/testcafe/releases/tag/v2.5.0-rc.1 TestCafe version.