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
v7.4.0 No longer allows localhost as a RouteMatcher hostname #17015
Comments
Confirmed with the code below: it('test', () => {
cy.intercept('/users*', { hostname: 'localhost' }, (req) => {
/* do something with request and/or response */
})
}) The code or doc should be fixed. |
@sainthkh the validation is incorrect, |
The code for this is done in cypress-io/cypress#17068, but has yet to be released. |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Current behavior
cy.intercept({ hostname: 'localhost' }, (req) => { ... })
Results in
Desired behavior
As the docs suggest (https://docs.cypress.io/api/commands/intercept#Usage), I should be able to use 'localhost' as the
hostname
.Test code to reproduce
cy.intercept({ hostname: 'localhost' }, (req) => { ... })
Versions
Introduced in 7.4.0 in this PR #16577
Worked in 7.3.0
The text was updated successfully, but these errors were encountered: