In my case, I usually want to normalize URLs relative to my origin and, since remembering one parameter is always better than remembering two, I ended using this pattern based on the Request constructor: