vivo-project / VIVO

VIVO is an extensible semantic web application for research discovery and showcasing scholarly work
http://vivoweb.org
BSD 3-Clause "New" or "Revised" License
208 stars 131 forks source link

VIVO-1503: Override baseURL with value from configuration #3094

Open chenejac opened 6 years ago

chenejac commented 6 years ago

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!

mjgiarlo commented 3 years ago

Feel free to close this issue unless someone else needs it. We no longer do. Thanks for migrating it.