I'm implementing a robots.txt
for a site in Node.js that uses both http and https. I can easily handle a get
for robots.txt in controllers for http and https, however the problem is that before my controllers handle the request, express (or connect?) looks for the file robots.txt
in the /public
directory and when it doesn't find it, it spits out a long "Not Found" error to my console. I'd like to clean this up and not have this error printed to my console.
How do I prevent express from looking for robots.txt on the filesystem since I'm handling it myself?