Hi. I set up the JWT secret auth for the API, and created a custom route, but the authentication is not working. Setting "requiresAuth" explicitly to true didn't help. I can call this endpoint without any auth header. Other regular "/api/*" endpoints are protected by auth properly.
apiRoutes: [
registerApiRoute('/custom/test', {
method: 'GET',
requiresAuth: true,
handler: async (c) => {
return c.json({ message: 'Custom route' })
},
}),
],