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

Proxy / Make distinction between methods. #101

Merged

Conversation

fxprunayre
Copy link

Some servers provides CORS header for some method eg. GET and not for other eg. HEAD. In such case, if a failure occurs on a HEAD request, then the proxy is activated for that domain but is not needed for GET request. If user is anonymous, then proxy forbid access to the domain (if the domain is not in the link analysis table with default configuration) and simple action like GetCapabilities will fail.

Add the method to the domain as key to know if the proxy has to be used or not.

Can be tested with https://haleconnect.com/ows/services/org.789.b36c0053-db6b-4fe7-9402-4e5d8ac35e06_wms

Checklist

  • I have read the contribution guidelines
  • Pull request provided for main branch, backports managed with label
  • Good housekeeping of code, cleaning up comments, tests, and documentation
  • Clean commit history broken into understandable chucks, avoiding big commits with hundreds of files, cautious of reformatting and whitespace changes
  • Clean commit messages, longer verbose messages are encouraged
  • API Changes are identified in commit messages
  • Testing provided for features or enhancements using automatic tests
  • User documentation provided for new features or enhancements in manual
  • Build documentation provided for development instructions in README.md files
  • Library management using pom.xml dependency management. Update build documentation with intended library use and library tutorials or documentation

Some servers provides CORS header for some method eg. GET and not for other eg. HEAD.
In such case, if a failure occurs on a HEAD request, then the proxy is activated for that domain but is not needed for GET request. If user is anonymous, then proxy forbid access to the domain (if the domain is not in the link analysis table with default configuration) and simple action like `GetCapabilities` will fail.

Add the method to the domain as key to know if the proxy has to be used or not.

Can be tested with https://haleconnect.com/ows/services/org.789.b36c0053-db6b-4fe7-9402-4e5d8ac35e06_wms
@josegar74 josegar74 merged commit 2e8af9b into GeoCat:44-followup-pr-7000 May 16, 2024
3 checks passed
josegar74 added a commit that referenced this pull request May 21, 2024
geonetwork#8023)

* WMS GetMap HEAD request error response - check response status defined

Follow up of geonetwork#7000

* WMS GetMap HEAD request error response - Don't use CORS interceptor.

If the map service doesn't support HEAD (or CORS for HEAD requests), all other requests to the server go through the http proxy, even if the server supports CORS for these requests

* Proxy / Make distinction between methods. (#101)

Some servers provides CORS header for some method eg. GET and not for other eg. HEAD.
In such case, if a failure occurs on a HEAD request, then the proxy is activated for that domain but is not needed for GET request. If user is anonymous, then proxy forbid access to the domain (if the domain is not in the link analysis table with default configuration) and simple action like `GetCapabilities` will fail.

Add the method to the domain as key to know if the proxy has to be used or not.

Can be tested with https://haleconnect.com/ows/services/org.789.b36c0053-db6b-4fe7-9402-4e5d8ac35e06_wms

---------

Co-authored-by: François Prunayre <[email protected]>
josegar74 added a commit that referenced this pull request May 23, 2024
…nse status defined (geonetwork#8076)

* WMS GetMap HEAD request error response - check response status defined

Follow up of geonetwork#7000

* WMS GetMap HEAD request error response - Don't use CORS interceptor.

If the map service doesn't support HEAD (or CORS for HEAD requests), all other requests to the server go through the http proxy, even if the server supports CORS for these requests

* Proxy / Make distinction between methods. (#101)

Some servers provides CORS header for some method eg. GET and not for other eg. HEAD.
In such case, if a failure occurs on a HEAD request, then the proxy is activated for that domain but is not needed for GET request. If user is anonymous, then proxy forbid access to the domain (if the domain is not in the link analysis table with default configuration) and simple action like `GetCapabilities` will fail.

Add the method to the domain as key to know if the proxy has to be used or not.

Can be tested with https://haleconnect.com/ows/services/org.789.b36c0053-db6b-4fe7-9402-4e5d8ac35e06_wms

---------

Co-authored-by: Jose García <[email protected]>
Co-authored-by: François Prunayre <[email protected]>
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