Skip to content
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

blacklistHosts ignored from CLI? #1155

Closed
combs opened this issue Jan 5, 2018 · 3 comments
Closed

blacklistHosts ignored from CLI? #1155

combs opened this issue Jan 5, 2018 · 3 comments
Assignees
Milestone

Comments

@combs
Copy link

combs commented Jan 5, 2018

  • Operating System: OS X 10.12.6
  • Cypress Version: 1.4.1 beta
  • Browser Version: Chrome Version 63.0.3239.132 (Official Build) (64-bit)

Is this a Feature or Bug?

Bug

Current behavior:

I can't get blacklistHosts to work at all when invoking cypress open. Here are the things I've tried:

export CYPRESS_blacklistHosts='adservice.google.com'; npx cypress open
npx cypress open --config blacklistHosts='adservice.google.com'
npx cypress open --config blacklistHosts="['adservice.google.com']"

Yet blacklistHosts does not appear in the "Settings/Configuration" section. I also do not see the requests being intercepted.

Desired behavior:

Works as described in documentation

How to reproduce:

See above

Test code:

Additional Info (images, stack traces, etc)

@combs combs changed the title blacklistHosts blacklistHosts ignored from CLI? Jan 5, 2018
@brian-mann
Copy link
Member

brian-mann commented Jan 5, 2018

I looked into this and found two bugs:

  1. Passing --blacklistHosts via the --config option is not actually setting it.
  2. When setting blacklistHosts in cypress.json it DOES get set, although it is NOT showing up in the resolved configuration area in the desktop app. However It is actually correctly 503'ing requests. Therefore this is just a visual bug.

For now, hopefully you can set this in your cypress.json. We'll get both of these fixed - there must be something strange that blacklistHosts does that nothing else does because all of these configuration values run through the same logic.

@brian-mann brian-mann self-assigned this Jan 5, 2018
@combs
Copy link
Author

combs commented Jan 5, 2018

Thanks a lot for your help! I was wondering if my syntax was wrong, since I couldn't find any examples of passing arrays via cli in the docs. Glad it wasn't just me :)

brian-mann added a commit that referenced this issue Jan 7, 2018
…I, display array on desktop gui settings

- added support for —config nested args such as arrays and objects
- use pipe syntax for multiple elements
- use brackets for arrays, curly braces for objects
brian-mann added a commit that referenced this issue Jan 8, 2018
…I, display array on desktop gui settings

- added support for —config nested args such as arrays and objects
- use pipe syntax for multiple elements
- use brackets for arrays, curly braces for objects
brian-mann added a commit that referenced this issue Feb 7, 2018
…I, display array on desktop gui settings
@jennifer-shehane jennifer-shehane added this to the 2.0.0 milestone Feb 8, 2018
@brian-mann
Copy link
Member

Released in 2.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants