Skip to content

autoDetectCORS option for proxy config#3675

Merged
mbarto merged 2 commits intogeosolutions-it:masterfrom
mbarto:auto_detect_cors
Apr 8, 2019
Merged

autoDetectCORS option for proxy config#3675
mbarto merged 2 commits intogeosolutions-it:masterfrom
mbarto:auto_detect_cors

Conversation

@mbarto
Copy link
Copy Markdown
Contributor

@mbarto mbarto commented Apr 5, 2019

Description

Optional configuration to introduce autodetect of CORS on services used by MapStore2.
If enabled, when contacting any service, MS2 will try to contact it directly, on error will fallback to using the proxy (and continue to use the proxy for following requests).

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (check one with "x", remove the others)

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior? (You can also link to an open issue here)
CORS is enabled only if an host is listed in useCORS configuration option.

What is the new behavior?
CORS is autodetected and proxy is only used as a fallback.

Does this PR introduce a breaking change? (check one with "x", remove the other)

  • Yes
  • No

If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...

Other information:

@ghost ghost assigned mbarto Apr 5, 2019
@mbarto mbarto added this to the 2019.02.00 milestone Apr 5, 2019
@coveralls
Copy link
Copy Markdown

coveralls commented Apr 5, 2019

Coverage Status

Coverage increased (+0.04%) to 81.034% when pulling bfa1c96 on mbarto:auto_detect_cors into 9159b11 on geosolutions-it:master.

Copy link
Copy Markdown
Member

@offtherailz offtherailz left a comment

Choose a reason for hiding this comment

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

Cool. Did you solved the without updating axios for error management?

@mbarto
Copy link
Copy Markdown
Contributor Author

mbarto commented Apr 5, 2019

@offtherailz I probably forgot to commit package.json, I have to check again...

@geosolutions-it geosolutions-it deleted a comment Apr 5, 2019
@mbarto mbarto merged commit 82ca81a into geosolutions-it:master Apr 8, 2019
@mbarto mbarto deleted the auto_detect_cors branch April 8, 2019 13:17
mbarto added a commit that referenced this pull request Apr 8, 2019
mbarto added a commit that referenced this pull request Apr 8, 2019
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