I have a Rails app that's getting hit by ScanAlert calling /login.php, but the app is throwing a 500. I'd like to filter any format that's not supported by my site, and 404 instead.
My original inclination was to create a before_filter in application_controller.rb that removes any :format that's not :html, :xml, or :js, then render 404.
However, it would be better to catch unsupported formats at the routing level. Has anyone approached it this way and what did you put in the routes file?
It would seem that this would be a common problem, yet I wasn't able to find any solutions.