elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.77k stars 8.17k forks source link

[HTTP] Move `readVersion` logic into the request #194107

Open jloleysens opened 1 week ago

jloleysens commented 1 week ago

Right now, the versioned route is where we read the version an incoming request. There are possible reasons (ex. 1, logging) for needing to know the request version earlier (or later) in the lifecycle outside of the route handler.

We should consolidate this logic so that Kibana only attempts to extract version as few times as possible (lazily, cached) and places it on the CoreKibanaRequest for other parts of the request lifecycle to see.

elasticmachine commented 1 week ago

Pinging @elastic/kibana-core (Team:Core)