There is a Middleware for Header validation. Add this logic there.