Move headers logic from http-header.middleware to json-schema.middleware.