middleware for title tags