Built-in hostname middleware for setting hostname