elastic / kibana

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

Not all HTTP APIs returning `elastic-api-version` headers in serverless #190735

Closed lukeelmers closed 1 month ago

lukeelmers commented 3 months ago

Currently not all HTTP APIs appear to be returning an elastic-api-version header in the response. I'm guessing this has something to do with which routes have moved over to using the versioned router.

Whether or not a route has moved over to the versioned router is an implementation detail... by default, all public APIs should be returning this header. If they haven't moved to the versioned router and explicitly declared a version, they are still implicitly versioned as 2023-10-31.

Example:

This is something we should look to address before serverless GA.

elasticmachine commented 3 months ago

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

TinaHeiligers commented 3 months ago

@jloleysens WDYT about reusing injectResponseHeaders in the non-versioned router? Would we need to make additional changes?

jloleysens commented 2 months ago

Yeah I think we can totally use that helper function. Should be pretty straight-forward to add this! Happy to take a look unless you've already started.