url.parse is an expensive function, so making sure to use it once for multiple middleware

we will add this to other middleware too like the mod_statuspage etc.

@evantorrie  -  can you check it too.
name change is a good suggestion. Updated the code.