ability to use proxy handler in independent way (attach to express for example)

I want to use this proxy as express middleware/handler (mapped to some mount path). Header "x-cors-anywhere-url" added to simplify obtaining URL in this case.