The UserAccountsEditPageStrategy in Vitro currently determines the baseURL – used, e.g., in account emails – from the HTTP request object. In some deployment scenarios, this is A-OK. In others, like ours at Stanford, where Tomcat is running behind an Apache HTTP proxy, account-related emails are sent to users with links (e.g., to reset a password) to localhost:8080. Instead, get the baseURL value from the Vitro configuration. To maintain backwards compatibility, if this is missing, get the value from the request object.
Michael Joseph Giarlo (Migrated from VIVO-1503) said:
The UserAccountsEditPageStrategy in Vitro currently determines the baseURL – used, e.g., in account emails – from the HTTP request object. In some deployment scenarios, this is A-OK. In others, like ours at Stanford, where Tomcat is running behind an Apache HTTP proxy, account-related emails are sent to users with links (e.g., to reset a password) to localhost:8080. Instead, get the baseURL value from the Vitro configuration. To maintain backwards compatibility, if this is missing, get the value from the request object.
There's an implementation in the Stanford fork of Vitro here: https://github.com/sul-dlss-labs/Vitro/pull/3/files#diff-09ec63d8689bb1da963ac6bb5fe3e40d I'd be happy to contribute this to upstream Vitro if there is interest. Caveats:
Code review and advice re: the above points would be most welcome!