Is it necessary to check for `content-type` in headers?
In the context of that question, yes it is. Without inspecting the content type header you don’t know if what is being served is an html page or an image, and while it is unlikely that the regex will match anything in an image, the risk is there. a different way to write that code … Read more