lychee would also be great to test web servers prior to production deployment.
Say one has a HTTP server that runs on 127.0.0.1:8080, but when it will be put into production it would actually serve https://example.com/. Also say that, due to developer laziness, the web server, even in development mode, has links that use the production domain (i.e. example.com).
Thus it would be useful to instruct lychee that whenever it sees https://example.com it should instead make a HTTP (without TLS) call to 127.0.0.1:8080.
To generalize, there should be the possibility to remap any HTTP/HTTPS endpoint to another HTTP/HTTPS endpoint, like for example:
--remap-url 'https://example.com http://127.0.0.1:8080'
--remap-url 'https://example.com https://staging.example.com'
Perhaps the first part (i.e. https://example.com) could be a regex to support a more generic use-case.
Also, this feature could also be used to proxy certain requests through certain proxies.
lycheewould also be great to test web servers prior to production deployment.Say one has a HTTP server that runs on
127.0.0.1:8080, but when it will be put into production it would actually servehttps://example.com/. Also say that, due to developer laziness, the web server, even in development mode, has links that use the production domain (i.e.example.com).Thus it would be useful to instruct
lycheethat whenever it seeshttps://example.comit should instead make a HTTP (without TLS) call to127.0.0.1:8080.To generalize, there should be the possibility to remap any HTTP/HTTPS endpoint to another HTTP/HTTPS endpoint, like for example:
Perhaps the first part (i.e.
https://example.com) could be a regex to support a more generic use-case.Also, this feature could also be used to proxy certain requests through certain proxies.