Skip to content

Add support for domain remapping URLs to custom endpoints (schema-IP-port) #547

@cipriancraciun

Description

@cipriancraciun

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions