From d64455fc0cb58e227345a592bbb9dd0a192bb9aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Tue, 14 Jan 2025 15:01:05 +0100 Subject: [PATCH] Fix small cache poisoning --- geoportal/c2cgeoportal_geoportal/views/dynamic.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/geoportal/c2cgeoportal_geoportal/views/dynamic.py b/geoportal/c2cgeoportal_geoportal/views/dynamic.py index 27f7585c82..40672c38d1 100644 --- a/geoportal/c2cgeoportal_geoportal/views/dynamic.py +++ b/geoportal/c2cgeoportal_geoportal/views/dynamic.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018-2021, Camptocamp SA +# Copyright (c) 2018-2025, Camptocamp SA # All rights reserved. # Redistribution and use in source and binary forms, with or without @@ -121,6 +121,7 @@ def _interface( @view_config(route_name="dynamic", renderer="json") # type: ignore def dynamic(self) -> Dict[str, Any]: + self.request.response.headers["Vary"] = "Host" original_interface_name = self.request.params.get("interface") interface_name = self.request.get_organization_interface(original_interface_name)