-
-
Notifications
You must be signed in to change notification settings - Fork 477
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
Map / Switch from GET to POST request improved in case of missing CORS header on HTTP errors #8036
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…S header on HTTP errors Some servers may not provide CORS header if an HTTP error occurs. eg. https://stackoverflow.com/questions/28584891/cors-header-not-being-served-by-apache-if-theres-a-404 On Apache, it depends on the usage of `always` in ``` Header always set Access-Control-Allow-Origin "*" ``` but it also depends on the list of virtual host in the configuration. A virtual host matching `*` or an IP corresponding to the domain may resolve first and the `Header` directive may not be the same in all virtual host. Can be tested, with https://sextant.ifremer.fr/services/wms/environnement_marin. When indexing features, large GET request may be generated when adding many filters eg. ``` angular.injector(["ng"]).get("$http").head("https://sextant.ifremer.fr/services/wms/environnement_marin?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=surval_lieux_actifs_REPHY_REPHYTOX_point&STYLES=&FILTER=(%3Cogc%3AFilter%20xmlns%3Axs%3D%22http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%22%20xmlns%3Agml%3D%22http%3A%2F%2Fwww.opengis.net%2Fgml%22%20xmlns%3Aogc%3D%22http%3A%2F%2Fwww.opengis.net%2Fogc%22%3E%3Cogc%3AAnd%3E%3Cogc%3AOr%3E%3Cogc%3APropertyIsLike%20escapeChar%3D%22%5C%22%20matchCase%3D%22false%22%20singleChar%3D%22%3F%22%20wildCard%3D%22*%22%3E%3Cogc%3APropertyName%3EQUADRIGE_ZONEMARINE%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3E079%20-%20Pertuis%20d'Antioche*%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3APropertyIsLike%3E%3Cogc%3APropertyIsLike%20escapeChar%3D%22%5C%22%20matchCase%3D%22false%22%20singleChar%3D%22%3F%22%20wildCard%3D%22*%22%3E%3Cogc%3APropertyName%3EQUADRIGE_ZONEMARINE%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3E*079%20-%20Pertuis%20d'Antioche%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3APropertyIsLike%3E%3Cogc%3APropertyIsLike%20escapeChar%3D%22%5C%22%20matchCase%3D%22false%22%20singleChar%3D%22%3F%22%20wildCard%3D%22*%22%3E%3Cogc%3APropertyName%3EQUADRIGE_ZONEMARINE%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3E*079%20-%20Pertuis%20d'Antioche*%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3APropertyIsLike%3E%3Cogc%3APropertyIsLike%20escapeChar%3D%22%5C%22%20matchCase%3D%22false%22%20singleChar%3D%22%3F%22%20wildCard%3D%22*%22%3E%3Cogc%3APropertyName%3EQUADRIGE_ZONEMARINE%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3E079%20-%20Pertuis%20d'Antioche%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3APropertyIsLike%3E%3C%2Fogc%3AOr%3E%3Cogc%3AOr%3E%3Cogc%3APropertyIsLike%20escapeChar%3D%22%5C%22%20matchCase%3D%22false%22%20singleChar%3D%22%3F%22%20wildCard%3D%22*%22%3E%3Cogc%3APropertyName%3ELIEU_LIBELLE%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3E079-P-002%20-%20Le%20Martray*%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3APropertyIsLike%3E%3Cogc%3APropertyIsLike%20escapeChar%3D%22%5C%22%20matchCase%3D%22false%22%20singleChar%3D%22%3F%22%20wildCard%3D%22*%22%3E%3Cogc%3APropertyName%3ELIEU_LIBELLE%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3E*079-P-002%20-%20Le%20Martray%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3APropertyIsLike%3E%3Cogc%3APropertyIsLike%20escapeChar%3D%22%5C%22%20matchCase%3D%22false%22%20singleChar%3D%22%3F%22%20wildCard%3D%22*%22%3E%3Cogc%3APropertyName%3ELIEU_LIBELLE%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3E*079-P-002%20-%20Le%20Martray*%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3APropertyIsLike%3E%3Cogc%3APropertyIsLike%20escapeChar%3D%22%5C%22%20matchCase%3D%22false%22%20singleChar%3D%22%3F%22%20wildCard%3D%22*%22%3E%3Cogc%3APropertyName%3ELIEU_LIBELLE%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3E079-P-002%20-%20Le%20Martray%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3APropertyIsLike%3E%3Cogc%3APropertyIsLike%20escapeChar%3D%22%5C%22%20matchCase%3D%22false%22%20singleChar%3D%22%3F%22%20wildCard%3D%22*%22%3E%3Cogc%3APropertyName%3ELIEU_LIBELLE%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3E079-P-010%20-%20Nord%20Saumonards*%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3APropertyIsLike%3E%3Cogc%3APropertyIsLike%20escapeChar%3D%22%5C%22%20matchCase%3D%22false%22%20singleChar%3D%22%3F%22%20wildCard%3D%22*%22%3E%3Cogc%3APropertyName%3ELIEU_LIBELLE%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3E*079-P-010%20-%20Nord%20Saumonards%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3APropertyIsLike%3E%3Cogc%3APropertyIsLike%20escapeChar%3D%22%5C%22%20matchCase%3D%22false%22%20singleChar%3D%22%3F%22%20wildCard%3D%22*%22%3E%3Cogc%3APropertyName%3ELIEU_LIBELLE%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3E*079-P-010%20-%20Nord%20Saumonards*%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3APropertyIsLike%3E%3Cogc%3APropertyIsLike%20escapeChar%3D%22%5C%22%20matchCase%3D%22false%22%20singleChar%3D%22%3F%22%20wildCard%3D%22*%22%3E%3Cogc%3APropertyName%3ELIEU_LIBELLE%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3E079-P-010%20-%20Nord%20Saumonards%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3APropertyIsLike%3E%3Cogc%3APropertyIsLike%20escapeChar%3D%22%5C%22%20matchCase%3D%22false%22%20singleChar%3D%22%3F%22%20wildCard%3D%22*%22%3E%3Cogc%3APropertyName%3ELIEU_LIBELLE%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3E079-P-024%20-%20Baie%20d'Yves%20(a)*%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3APropertyIsLike%3E%3Cogc%3APropertyIsLike%20escapeChar%3D%22%5C%22%20matchCase%3D%22false%22%20singleChar%3D%22%3F%22%20wildCard%3D%22*%22%3E%3Cogc%3APropertyName%3ELIEU_LIBELLE%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3E*079-P-024%20-%20Baie%20d'Yves%20(a)%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3APropertyIsLike%3E%3Cogc%3APropertyIsLike%20escapeChar%3D%22%5C%22%20matchCase%3D%22false%22%20singleChar%3D%22%3F%22%20wildCard%3D%22*%22%3E%3Cogc%3APropertyName%3ELIEU_LIBELLE%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3E*079-P-024%20-%20Baie%20d'Yves%20(a)*%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3APropertyIsLike%3E%3Cogc%3APropertyIsLike%20escapeChar%3D%22%5C%22%20matchCase%3D%22false%22%20singleChar%3D%22%3F%22%20wildCard%3D%22*%22%3E%3Cogc%3APropertyName%3ELIEU_LIBELLE%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3E079-P-024%20-%20Baie%20d'Yves%20(a)%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3APropertyIsLike%3E%3Cogc%3APropertyIsLike%20escapeChar%3D%22%5C%22%20matchCase%3D%22false%22%20singleChar%3D%22%3F%22%20wildCard%3D%22*%22%3E%3Cogc%3APropertyName%3ELIEU_LIBELLE%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3E079-P-026%20-%20Le%20Cornard*%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3APropertyIsLike%3E%3Cogc%3APropertyIsLike%20escapeChar%3D%22%5C%22%20matchCase%3D%22false%22%20singleChar%3D%22%3F%22%20wildCard%3D%22*%22%3E%3Cogc%3APropertyName%3ELIEU_LIBELLE%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3E*079-P-026%20-%20Le%20Cornard%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3APropertyIsLike%3E%3Cogc%3APropertyIsLike%20escapeChar%3D%22%5C%22%20matchCase%3D%22false%22%20singleChar%3D%22%3F%22%20wildCard%3D%22*%22%3E%3Cogc%3APropertyName%3ELIEU_LIBELLE%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3E*079-P-026%20-%20Le%20Cornard*%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3APropertyIsLike%3E%3Cogc%3APropertyIsLike%20escapeChar%3D%22%5C%22%20matchCase%3D%22false%22%20singleChar%3D%22%3F%22%20wildCard%3D%22*%22%3E%3Cogc%3APropertyName%3ELIEU_LIBELLE%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3E079-P-026%20-%20Le%20Cornard%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3APropertyIsLike%3E%3Cogc%3APropertyIsLike%20escapeChar%3D%22%5C%22%20matchCase%3D%22false%22%20singleChar%3D%22%3F%22%20wildCard%3D%22*%22%3E%3Cogc%3APropertyName%3ELIEU_LIBELLE%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3E079-P-029%20-%20Aytr%C3%A9*%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3APropertyIsLike%3E%3Cogc%3APropertyIsLike%20escapeChar%3D%22%5C%22%20matchCase%3D%22false%22%20singleChar%3D%22%3F%22%20wildCard%3D%22*%22%3E%3Cogc%3APropertyName%3ELIEU_LIBELLE%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3E*079-P-029%20-%20Aytr%C3%A9%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3APropertyIsLike%3E%3Cogc%3APropertyIsLike%20escapeChar%3D%22%5C%22%20matchCase%3D%22false%22%20singleChar%3D%22%3F%22%20wildCard%3D%22*%22%3E%3Cogc%3APropertyName%3ELIEU_LIBELLE%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3E*079-P-029%20-%20Aytr%C3%A9*%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3APropertyIsLike%3E%3Cogc%3APropertyIsLike%20escapeChar%3D%22%5C%22%20matchCase%3D%22false%22%20singleChar%3D%22%3F%22%20wildCard%3D%22*%22%3E%3Cogc%3APropertyName%3ELIEU_LIBELLE%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3E079-P-029%20-%20Aytr%C3%A9%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3APropertyIsLike%3E%3Cogc%3APropertyIsLike%20escapeChar%3D%22%5C%22%20matchCase%3D%22false%22%20singleChar%3D%22%3F%22%20wildCard%3D%22*%22%3E%3Cogc%3APropertyName%3ELIEU_LIBELLE%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3E079-P-027%20-%20Chatelaillon%20(a)*%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3APropertyIsLike%3E%3Cogc%3APropertyIsLike%20escapeChar%3D%22%5C%22%20matchCase%3D%22false%22%20singleChar%3D%22%3F%22%20wildCard%3D%22*%22%3E%3Cogc%3APropertyName%3ELIEU_LIBELLE%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3E*079-P-027%20-%20Chatelaillon%20(a)%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3APropertyIsLike%3E%3Cogc%3APropertyIsLike%20escapeChar%3D%22%5C%22%20matchCase%3D%22false%22%20singleChar%3D%22%3F%22%20wildCard%3D%22*%22%3E%3Cogc%3APropertyName%3ELIEU_LIBELLE%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3E*079-P-027%20-%20Chatelaillon%20(a)*%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3APropertyIsLike%3E%3Cogc%3APropertyIsLike%20escapeChar%3D%22%5C%22%20matchCase%3D%22false%22%20singleChar%3D%22%3F%22%20wildCard%3D%22*%22%3E%3Cogc%3APropertyName%3ELIEU_LIBELLE%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3E079-P-027%20-%20Chatelaillon%20(a)%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3APropertyIsLike%3E%3C%2Fogc%3AOr%3E%3C%2Fogc%3AAnd%3E%3C%2Fogc%3AFilter%3E)&CRS=EPSG%3A3857&WIDTH=1183&HEIGHT=1050&BBOX=-165448.08519230082%2C5777401.481768884%2C-121888.37819306905%2C5816063.943602521", {}).then( function(c) {console.log("success", c)}, function(c) {console.log("error", c)}) ```
Quality Gate passedIssues Measures |
josegar74
approved these changes
May 17, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Complementary to #8023
Some servers may not provide CORS header if an HTTP error occurs. eg. https://stackoverflow.com/questions/28584891/cors-header-not-being-served-by-apache-if-theres-a-404 On Apache, it depends on the usage of
always
inbut it also depends on the list of virtual host in the configuration. A virtual host matching
*
or an IP corresponding to the domain may resolve first and theHeader
directive may not be the same in all virtual host.Can be tested, with https://sextant.ifremer.fr/services/wms/environnement_marin. When indexing features, large GET request may be generated when adding many filters eg.
When possible, it is better to improve the webserver configuration for the WMS.
Checklist
main
branch, backports managed with labelREADME.md
filespom.xml
dependency management. Update build documentation with intended library use and library tutorials or documentationFunded by Ifremer