Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use relative redirect location (#35)
Previously, by cloning the request URL, we were inheriting the `host` and constructing an absolute URL as the `Location`. This is a problem in certain cases, like if the app is running behind a reverse-proxy. From the outside, requests to the proxy may be coming in as `example.com`, but the application may see something else like `localhost`. We can avoid this by just using whatever was given as the `returnPathname`, or falling back to the default of `/` which is a relative URL.
- Loading branch information