-
Notifications
You must be signed in to change notification settings - Fork 134
Exclude context path from application generated links #4011
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
f24c923
to
b353e55
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@litvinovg this is not fully functional in my case. I conducted the following testing steps on windows:
- Installed nginx for Windows
- Configure nginx.conf
location / {
proxy_pass http://localhost:8080/vivo/;
include proxy_params;
}
- Add proxy_params file with the following content
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
- Add in vivo_home/config/runtime.properties
context.path=
The first page is loaded properly including css. Moreover, I can browse through individual pages, persons, organizations, etc. Search page is also working.
I can't login. Also, I can't open any visualization (capability map, map of science, co-author network, and there is always the same message:
Inappropriate query parameters were submitted.
@litvinovg after configuring sessionCookiePath="/" for Context in tomcat, I can log in, but the issue with visualization is still there. I can edit data properties, for instance publication date for an academic article, but if I select Edit individual I am getting the error message (in the form of java script alert) - A server error has occurred. |
Visualizations should work now, I reverted one mistakenly made change that broke it. |
@litvinovg I can confirm visualizations work now. Moreover, after additional configuration DWR is not an issue anymore. In my case, the configuration is
I think we should point/warn customers to this specific location configuration for DWR in example.runtime.properties in the comment above contextPath parameter (in Vitro and VIVO). |
e402232
to
c197a19
Compare
Rebased on top of main branch |
6391e33
to
085b03e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and works great! Same minor comments about example.runtime.properties as on companion Vitro PR.
…ple.runtime.properties
Description for the new configuration property has been updated. |
VIVO GitHub issue: (please link to issue)
Vitro 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