mirror of
https://github.com/cypress-io/cypress.git
synced 2026-02-10 09:10:12 -06:00
* update url with studio params * updates * spec updates * adding tests * updating changelog * skip adding visit log during start * update url support * cy origin tests * fix tests * updates * update origin test * chore: support studio lifecycle in protocol * merge changes * fix types * fix tests * fix tests * fix tests * fix more tests * fix more tests * fix more tests * fix test * fix bugs * fix tests * attempt to fix test * further fixes * improve cloud studio enablement * refactoring * remove new dom link * fix last test * Update packages/app/cypress/e2e/studio/studio.cy.ts * Update packages/server/lib/project-base.ts * Update packages/proxy/lib/http/request-middleware.ts Co-authored-by: Matt Schile <mschile@cypress.io> * PR comments * fix build * fix build * update * Update packages/server/lib/project-base.ts Co-authored-by: Matt Schile <mschile@cypress.io> * fix unit test * rework save logic --------- Co-authored-by: Matthew Schile <mschile@cypress.io> Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
proxy
This package contains the code for Cypress's HTTP interception proxy.
HTTP interception
./lib/http contains the code that intercepts HTTP requests. The bulk of the proxy's behavior is in three files:
request-middleware.tscontains code that manipulates HTTP requests from the browserresponse-middleware.tscontains code that manipulates HTTP responses to the browsererror-middleware.tshandles errors that occur in the request/response cycle
Building
Note: you should not ever need to build the .js files manually. @packages/ts provides require-time transpilation when in development.
yarn workspace @packages/proxy build-prod
Testing
Tests are located in ./test
To run tests:
yarn workspace @packages/proxy test
Additionally, the server package contains tests that use the proxy.
Debug Logs
High level logs are available in the DEBUG=cypress:proxy:* namespace.
Detailed per-request logs are available in DEBUG=cypress-verbose:proxy:http.