summaryrefslogtreecommitdiff
path: root/include/security_headers.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/security_headers.hpp')
-rw-r--r--include/security_headers.hpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/security_headers.hpp b/include/security_headers.hpp
index c0855f439d..2a2eb40d7d 100644
--- a/include/security_headers.hpp
+++ b/include/security_headers.hpp
@@ -16,8 +16,11 @@ inline void addSecurityHeaders(const crow::Request& req [[maybe_unused]],
"includeSubdomains");
res.addHeader(bf::pragma, "no-cache");
- res.addHeader(bf::cache_control, "no-store, max-age=0");
+ if (res.getHeaderValue(bf::cache_control).empty())
+ {
+ res.addHeader(bf::cache_control, "no-store, max-age=0");
+ }
res.addHeader("X-Content-Type-Options", "nosniff");
std::string_view contentType = res.getHeaderValue("Content-Type");