-
Notifications
You must be signed in to change notification settings - Fork 676
Proxy conflicts with dynamically added content security policy #6057
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proxy conflicts with dynamically added content security policy #6057
Comments
Hello, Thank you for your report. I reproduced this behavior. We need some time to research it. For now, use the '--skip-js-errors' flag as a workaround. |
Thanks @felis2803. Unfortunately, using |
Hey, has there been an update on this issue, with version 1.14.0 the issue persists? We've noticed that it started with version 1.11.0. Most likely related to this change:
Sadly |
Hello @Ghost-J, We didn't look into this problem yet. So, it still persists in TestCafe 1.14.0. We will update this thread once we have any news. |
Issue still persists with version 1.15.2. Thought I'd push the thread as the bot removed the "need response" state. PS: Due to not being able to update we aren't able to resolve the issue mentioned here. DevExpress/testcafe-hammerhead#2653 |
Hi @Aaronius
TestCafe is trying to remove CSP directives in tags and headers from the tested page. The case when the |
Hi, the issue still persists with testcafe v1.18.1 and hammerhead v17.1.26. |
The fix will be shipped with the next TestCafe version ( |
The issue still seems to persist with testcafe v1.18.2 and hammerhead v.24.5.13 |
@Ghost-J, You're right, this issue is still reproducible on testcafe@1.18.2. |
What is your Test Scenario?
I'll describe a simplified version of our test scenario:
We have a test that runs on a page that adds a content security policy via JavaScript, then sends a request to example.com, which is one of the hosts listed in the
connect-src
directive in the content security policy.What is the Current behavior?
The test fails because the request to example.com is blocked. Although our request is intended to go to example.com, hammerhead (I assume) is changing our request URL to look like:
which gets blocked by the CSP, because
192.168.1.131
isn't listed as an allowed host in the CSP.This seems to be a fairly new issue (1.11.0 or possibly earlier). We did not run into this issue on 1.10.0.
What is the Expected behavior?
I would expect the request to example.com to succeed, because the host is allowed by the CSP.
What is your web application and your TestCafe test code?
Your website URL (or attach your complete example):
Your complete test code (or attach your test files):
Your complete test report:
Steps to Reproduce:
You can clone https://github.com/Aaronius/testcafe-bugs
Check out the
csp
branch.Run
npm install
Run
npm start
In a different terminal, run
npm test
Your Environment details:
The text was updated successfully, but these errors were encountered: