Closed
Description
According to the documentation, any GET endpoint also serves OPTIONS and HEAD requests.
I would expect these to be hit before the route :any
at the bottom of my api. But this isn't the case.
Is this a bug or intentional? If it's intentional, what's the right way to catch stray requests without overriding OPTIONS and HEAD for the real endpoints?
route :any, '*path' do
raise NotFound, 'Path not NotFound'
end
Here is a demo api. I would expect this request to return the Allow
header for the /names
endpoint. But instead it return I'm not here
, which means it hits the route :any
fallback.
OPTIONS /names