Exclude context path from application generated links#475
Exclude context path from application generated links#475chenejac merged 5 commits intovivo-project:mainfrom
Conversation
chenejac
left a comment
There was a problem hiding this comment.
@litvinovg I have left two tiny comments. Please, also invest whether edu/cornell/mannlib/vitro/webapp/filters/PageRoutingFilter.java should be updated as well.
.../main/java/edu/cornell/mannlib/vitro/webapp/controller/freemarker/ContactFormController.java
Outdated
Show resolved
Hide resolved
...ain/java/edu/cornell/mannlib/vitro/webapp/freemarker/config/FreemarkerConfigurationImpl.java
Outdated
Show resolved
Hide resolved
I think PageRoutingFilter shouldn't be changed. |
chenejac
left a comment
There was a problem hiding this comment.
@litvinovg thanks. Well done.
dbdf160 to
1ed178a
Compare
|
Resolved merge conflicts, rebased on top of main branch |
brianjlowe
left a comment
There was a problem hiding this comment.
See comment on FreemarkerHttpServlet.java
.../main/java/edu/cornell/mannlib/vitro/webapp/controller/freemarker/FreemarkerHttpServlet.java
Show resolved
Hide resolved
0def300 to
47b6f4e
Compare
brianjlowe
left a comment
There was a problem hiding this comment.
Have tested the various functionality when reverse-proxying the root path to the /vivo/ context in Tomcat. Everything works fine, and this is a very useful feature. I made just some very tiny suggested tweaks to the example.runtime.properties.
| # | ||
| Vitro.defaultNamespace = http://vivo.mydomain.edu/individual/ | ||
|
|
||
| # To exclude tomcat application context name from generated links uncomment following line. |
There was a problem hiding this comment.
I would leave a blank line (without #) before the next property starts on line 29, which would match the corresponding file in VIVO. I would also suggest a small edit to "To exclude the Tomcat [capitalized]..." and putting a period after "Default value is false."
…ple.runtime.properties
VIVO GitHub issue: (please link to issue)
VIVO PR
What does this pull request do?
New boolean configuration property context.path.exclude to exclude tomcat application context from generated links useful in case the application is deployed with reverse proxy.
What's new?
Created context.path.exclude configuration property to exclude context path from generated links.
Replaced calls for context path to utility methods that allow overriding default context path.
How should this be tested?
Default behavior when configuration property is not set should be the same.
#Additional notes
Interested parties
@VIVO-project/vivo-committers
Reviewers' expertise
Candidates for reviewing this PR should have some of the following expertises:
Reviewers' report template
General comment
A reviewer should provide here comments and suggestions for requested changes if any.
Testing
A reviewer should briefly describe here how it was tested
Code reviewing
A reviewer should briefly describe here which part was code reviewed