ec-jrc / re3gistry

Re3gistry is a reusable open source solution for managing and sharing ‘reference codes’, ensuring semantic interoperability across organisations.
European Union Public License 1.2
29 stars 23 forks source link

configuration parameter `web.application_root_url` neglected on some forwards (HTTP 302) #367

Open jane-heller-bkg opened 7 months ago

jane-heller-bkg commented 7 months ago

The re3gistry webapplication does not seem to follow the web.application_root_url configuration value correctly all of the time.

My setup is as follows:

I have a frontend proxy delivering the application to say http**s**://{HOSTNAME}/codelist. The backend webserver is running a tomcat which is deploying:

both to their according subfolders on local http.

re3gistry2/WEB-INF/classes/configurations_files/configuration.properties contains:

web.application_root_url=https://{HOSTNAME}/codelist

If I open the webservice and login, I receive a HTTP 302 to the following destination:

http://{HOSTNAME}/re3gistry2/admin

it should however contain

https://{HOSTNAME}/re3gistry2/admin

It seems to me, that the webapplication is costructing the path to be returned in a 302 on its own, by concatenating http the http host coming from the http connections variable and the folder on which the webapp is delivered locally.

It should forward to URLs based on web.application_root_url in any case.

unaibrrgn commented 7 months ago

Dear @jane-heller-bkg, we will take a look and let you know any progress made on this topic.

Best regards, Unai.

jane-heller-bkg commented 6 months ago

We have used the branch bkg/database-migration when stumbling upon this error ( https://github.com/ec-jrc/re3gistry/pull/387 ). However it seems unlikely to me, that the changes there affect this issue.

jane-heller-bkg commented 5 months ago

Dear @unaibrrgn,

I stumbled upon another case where a URI generation is not done correctly.

If I issue a clarification via https://<HOST>/re3gistry2/content?itemUuid=<UUID> there are links in the row status pointing to different status types. They also do not follow the configuration parameters but use the local hostname of the delivering webserver without any subpath (that is different from the behaviour in the forwards).

Should I issue another ticket for that or should we summarize all issues w.rt. to URI generation here?

Best

Jane

iratigarzon commented 4 months ago

Dear @jane-heller-bkg,

We suggest you to open a new ticket with the issue you are currently experiencing. Any additional information would be appreciated.

Best regards,

Irati.

jane-heller-bkg commented 3 months ago

Hello @iratigarzon ,

I opened another issue w.r.t. here: https://github.com/ec-jrc/re3gistry/issues/438

Best

Jane