Hacker News new | ask | show | jobs
by luckylion 1888 days ago
You can do it with a Worker, it'll do completely independent requests to the backend and you can then rewrite them (e.g. change headers, content) and relay them to the client.
2 comments

I did just this, to create a version of Github with scrambled text.

https://guthib.mattbasta.workers.dev/

I found this to be the case on CloudFront as well. As far as I can tell, it's not possible to direct the request to a different, custom origin based on the Host header. Only the URL path.

The recommendation is to use a Lambda@Edge worker to do it. I find this very annoying.