Open Piedone opened 4 years ago
Currently the tenant URL prefix is always added to the redirect URL. Do you think we should make it only include the tenant prefix if the redirect URL is prefixed with "~/"? Definitely worth including a hint to state relative URLs will be prefixed with tenant URL prefixed.
Ah I see. I think the tilde notation as used throughout ASP.NET and in other parts of Orchard too is a more generic approach (it would also open up the option to not use it deliberately but I don't think that would be a popular use-case).
Agreed it wouldn't be a common use case but if I wanted to redirect to another site (e.g. https://google.co.uk) then currently the code would try to redirect to /tenant-prefix/https://google.co.uk
, so that definitely needs resolving. I'll also make sure the tilde is supported too 👍
Great, thank you!
It seems to me that if a tenant URL prefix is configured then that should be included in the redirect URL, making the DB not portable between environments if the prefix is different (or doesn't exist). Adding support for tilde-prefixed URLs would solve this. E.g. "~/" would redirect to the tenant's homepage, regardless it having a URL prefix or not.