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

Support http links in the Géo-IDE transformation #246

Merged
merged 1 commit into from
Aug 9, 2023

Conversation

jahow
Copy link
Contributor

@jahow jahow commented Jul 31, 2023

This simple change to Géo-IDE records makes it so that links using the http:// protocol are automatically upgraded to https://, for which there is already a redirection on the Géo-IDE side.

Handling this upgrade during harvesting avoids getting a 301 redirection later on when downloading the data for the datahub, as the 301 redirection will bypass the proxy and make a CORS error show up.

To see a record which advertises WxS services in HTTP: http://catalogue.geo-ide.developpement-durable.gouv.fr/catalogue/srv/api/records/fr-120066022-jdd-0b5c2019-2bc1-4188-8a7c-bcb8630c1073/formatters/xml
image

Using the modified transformation part of this PR, this gives: https://dev.geo2france.fr/geonetwork/srv/api/records/fr-120066022-jdd-0b5c2019-2bc1-4188-8a7c-bcb8630c1073/formatters/xml?approved=true
image

This simple change makes it so that links specified using the `http://` protocol  are automatically upgraded to `https://`, for which there is already a redirection on the Géo-IDE side.

Handling this upgrade during harvesting avoids getting a 301 redirection later on when downloading the data for the datahub, as the 301 redirection will bypass the proxy and make a CORS error show up.
@fvanderbiest fvanderbiest added this to the 23.0.1 milestone Aug 9, 2023
@fvanderbiest fvanderbiest merged commit 3b8dae6 into georchestra-gn4.2.x Aug 9, 2023
@fvanderbiest fvanderbiest deleted the geoide-handle-http-links branch August 9, 2023 11:19
@fvanderbiest
Copy link
Member

LGTM, thanks Olivia !

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.

2 participants