Allow auto-detection of portal URL and domain
One of my LLNG instances needs to be reached by internal and external users but on a different URL.
The portal uses $self->conf->{portal} and $self->conf->{domain} to get its own URL and cookie domain. But it doesn't work in this particular use case, because in my use case the portal and domain depends on $req
.
This is similar to #933, but I think the fix proposed there no longer works since the migration to PSGI.
In the handler: it's probably not too difficult to do because every access to the portal URL goes through $class->tsv->portal. We just need to pass $req
to it.
In the portal: we need to replace all calls to $self->conf->{portal}
and $self->conf->{domain}
to methods such as getPortalUrl($req)
and getDomain($req)
. This will require a lot of refactoring, but I think its a good idea because users will no longer have to define the portal
and domain
configuration variables anymore in most cases.
This is also a requirement of #2285
If I can find sponsorship for this feature I might implement it in 2.19