-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Maps] Fix proxy handling issues #71182
[Maps] Fix proxy handling issues #71182
Conversation
…g-and-meta-url-construction
…g-and-meta-url-construction
…g-and-meta-url-construction
💚 Build SucceededBuild metrics
History
To update your PR or re-run it, just comment with: |
Pinging @elastic/kibana-gis (Team:Geo) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checked out locally and tested both with and without the proxy enabled and everything seems to work fine on the functional side 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. code review and tested in firefox
elastic_tile_service_tos: schema.maybe(schema.string()), | ||
my_app_name: schema.maybe(schema.string()), | ||
my_app_version: schema.maybe(schema.string()), | ||
license: schema.maybe(schema.string()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit, but up to you really. we repeat some of these schemas such as elastic_tile_service_tos: schema.maybe(schema.string()),
several times in this file. would it be feasible and easy to avoid duplicating these schemas?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I know what you mean, it does get a little repetitive. As far as I can tell, there's not an easy way to create reusable validation that we can also build upon (i.e.- add more validation where needed) unless we use a custom validator that does some base validation such as checking elastic_tile_service_tos: schema.maybe(schema.string())
etc. before doing any additional validation required by the calling route. tbh I'm still not sure that's the right path either so kicking that can down the road for now to get this fix in.
Resolves #67593. There were a few things preventing EMS proxies from functioning correctly:
maps/public/meta.ts
used relative paths which resolved to the incorrect final URL. They also lacked a prepended basepath which is necessary for them to work correctly in a dev environment although they might work fine in production.xpack.maps
config was being passed to routes but they require values from themaps_legacy
(map
) config. This is admittedly confusing (related [Maps] Decouple maps and maps_legacy config dependencies #64810)query
orparams
vars or alternatively some validation exists but differentparams
/queries
are passed. We had a couple of routes involved in proxying that met these criteria.