Reputation: 375
I disabled the default routes in the policies file.
module.exports.policies = {
'RabbitController': {
'*': false
}
}
Is there a way to change the 403 forbidden error to a 404 when you try to access to a disabled route?
Upvotes: 3
Views: 589
Reputation: 5979
Just create a policy that directs the user to the 404 as seen below. I have placed it inline, but it could be in a policy file as well.
module.exports.policies = {
'RabbitController': {
'*': function(req,res){return res.notFound()}
}
}
Upvotes: 2