Not sure if this URL checking is reliable. The other middlewares do something with regexes.