Improved `redirect` operator to support more url types
A new parameter type
can be used to control how the resulting URL is generated.
It can contain one of
abs
- Generates an absolute url, with path-prefix/siteaccessroot
- Generates a relative url without path-prefix/siteaccessabsroot
- Generates an absolute url, without path-prefix/siteaccess
Additionally improvements:
- Url starting with double slashes, ie. url without a scheme are supported.
- Improved https detection, now works if behind a proxy.
For instance to ensure that an absolute url is returned:
{redirect("/about", 302, "abs")}
{redirect("https://example.org", 302, "abs")}