My servers are being hit by sporadic OPTIONS requests to my root path. These are all bots trying to find vulnerabilities. I want to return a 404 not found
instead of raising an error, since my error tracking service is being hit all the time.
I have tried using:
options '/', to: 'application#return_not_found'
to route these requests properly, but Rails 5 gives me an error.