Skip to content

Commit

Permalink
Merge pull request #11644 from camptocamp/backport/11643-to-master
Browse files Browse the repository at this point in the history
[Backport master] Fix small cache poisoning
  • Loading branch information
sbrunner authored Jan 15, 2025
2 parents a8272de + 1114349 commit 5c99685
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion geoportal/c2cgeoportal_geoportal/views/dynamic.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2018-2024, Camptocamp SA
# Copyright (c) 2018-2025, Camptocamp SA
# All rights reserved.

# Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -124,6 +124,7 @@ def _interface(
@view_config(route_name="dynamic", renderer="json") # type: ignore[misc]
def dynamic(self) -> dict[str, Any]:
is_allowed_host(self.request)
self.request.response.headers["Vary"] = "Host"

original_interface_name = self.request.params.get("interface")
interface_name = self.request.get_organization_interface(original_interface_name)
Expand Down

0 comments on commit 5c99685

Please sign in to comment.