expose icon indicating copy to clipboard operation
expose copied to clipboard

Host rewrite in body

Open Mte90 opened this issue 5 years ago • 3 comments

Expose is cool but the issue I have it is that the request is the same html so as example is pointing to assets that are on the local domain but not the domain generated as sharedwithexpose.

This creates also issues with endpoints that include the full url with the local domain instead of the new one, so I cannot use it.

Mte90 avatar Jul 15 '20 16:07 Mte90

Is the issue that expose will not forward the assets when requested or are your assets linked statically to your local domain (maybe through )?

CDRO avatar Jul 27 '20 14:07 CDRO

The issue is that the request doesn't have any rewrite of urls like ngrok does. So if the page has a local url used for images or css this doesn't work outside.

Mte90 avatar Jul 27 '20 15:07 Mte90

I have tried adding a rewrite of the original host with the expose host in the response body, but the chunked processing of responses complicates this. It does work fine, as long as the host is not split between chunks. I am not very experienced with stream processing, so maybe somebody else has another idea?

I have thought about fetching the entire response before processing, but that would not be great for larger responses 🙂

kleinmann avatar Oct 14 '21 11:10 kleinmann

Closing this issue because it's stale. Please feel free to open a new one if it's still relevant.

sschlein avatar Dec 21 '23 13:12 sschlein