From c2c0796755cf99733e65d1113e7861f685fcaec6 Mon Sep 17 00:00:00 2001 From: yang-ruoxi Date: Fri, 9 Aug 2024 16:13:19 -0700 Subject: [PATCH] add response header check back --- src/maggma/api/resource/read_resource.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/maggma/api/resource/read_resource.py b/src/maggma/api/resource/read_resource.py index 4ff112981..ec440a474 100644 --- a/src/maggma/api/resource/read_resource.py +++ b/src/maggma/api/resource/read_resource.py @@ -281,6 +281,12 @@ def search(**queries: dict[str, STORE_PARAMS]) -> Union[dict, Response]: if self.disable_validation: response = Response(orjson.dumps(response, default=serialization_helper)) # type: ignore + if self.header_processor is not None: + if self.disable_validation: + self.header_processor.process_header(response, request) + else: + self.header_processor.process_header(temp_response, request) + return response self.router.get(