Skip to content
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

Fix microservices proxy detection #7106

Merged
merged 1 commit into from
May 25, 2023

Conversation

juanluisrp
Copy link
Contributor

@juanluisrp juanluisrp commented May 24, 2023

Follow-up of #7094.

The targetUri property can be configured using multiple methods, not only as init parameter in web.xml servlet's config but also as environment variable, system property or config.properties entry. This change saves the targetUri value in a ServletContext attribute so it can be retrieved from other servlets to check its value. Added <load-on-startup> servlet property to init the attribute on server start.

Follow-up of geonetwork#7094.

The targetUri property can be configured using multiple methods, not only as init parameter
in web.xml servlet's config but also as environment variable, system property or config.properties
entry. This change saves the targetUri value in a ServletContext attribute so it can be retrieved
from other servlets to check its value. Changed the value of <load-on-startup> servlet property
to init the attribute on server start.
@juanluisrp juanluisrp added this to the 4.2.5 milestone May 24, 2023
@fxprunayre fxprunayre merged commit 817805c into geonetwork:main May 25, 2023
Copy link
Member

@josegar74 josegar74 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested the different scenarios and works fine:

  • Environment variable: export GEONETWORK_MICROSERVICESPROXY_TARGETURI=http://localhost:9901

  • JVM parameter: -Dgeonetwork.MicroServicesProxy.targetUri=http://localhost:9901

  • config.properties: geonetwork.MicroServicesProxy.targetUri=http://localhost:9901

  • Update pom.xml: <microservices.url>http://localhost:9901</microservices.url>

@juanluisrp juanluisrp deleted the 425-microservices-config branch May 25, 2023 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants