Files
cypress/packages/proxy
Zach Bloomquist b0378dc04e Refactor proxy into own package, implement middleware pattern (#5136)
* renames

* Refactor proxy into own package, implement middleware pattern

don't need these mocha opts anymore

fix test

no more zunder

READMEs

fix test

* pass request by reference

* fix cors path

* Move replace_stream to proxy, concat-stream util in network

* Pin dependency versions

* Revert addDefaultPort behavior

* Add READMEs for proxy, network

* Update README.md

* eslint --fix

* set to null not undefined

* use delete and bump node types

* import cors from package now

* parse-domain@2.3.4

* proxy package needs common-tags

* move pumpify dep

* load through where it's needed, remove unused passthru_stream

* remove unneeded getbuffer call


Co-authored-by: Gleb Bahmutov <gleb.bahmutov@gmail.com>
2019-11-27 19:16:15 -05:00
..

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:

Installing Dependencies

npm i

Building

Note: you should not ever need to build the .js files manually. @packages/ts provides require-time transpilation when in development.

npm run build-js

Testing

Tests are located in ./test

To run tests:

npm run test

Additionally, the server package contains tests that use the proxy.