On Sun, 04 May 2014 20:04:33 GMT, Sönke Ludwig wrote:

A redirectSite function could be useful, but it would also have to support the case, where there is a different port/protocol/path prefix compared to the original URL, so I'm not sure how much value it would actually add.

  1. What if the redirectSite function took a function/delegate/unaryFun that received the (full) request URL and returned the transformed URL? redirectSite(url => (url.host = "example.com", url));. If it was templated with unaryFun I guess it would always be inlined?

  2. What if there was a place (in the docs) where it was easy to find such common recipes, would that be good enough to avoid adding such utility functions? Having a central place would make it easy to ensure that the recipe was correct, that users could ask questions about corner cases, etc.