Layer0 doesn't cache OPTIONS response with match()

Hi All
We have line in router
router.match(/api/${endpoint}, apiCacheHandler)
This line explicitly cache GET/POST responses, but OPTIONS responses aren’t cached in some reason. But server-timing header contains same match router description
Only router.options(/api/${endpoint}, apiCacheHandler) returns cached experience.
match() method description says

Adds a route matching all methods.

Is it any issue with match() or it’s expected behaviour

1 Like

My understanding is that .match() will look for the route criteria regardless of the HTTP method, but in order to explicitly cache non-GET/HEAD requests, you need to define the cache handler either on the .post() or .options() calls.

That being said, I don’t expect your POST request to .match to be returning a cached response as you have claimed. Can you list all the response headers?