From 5c5ed43caadc84b2a4b6582a452a57c78588610b Mon Sep 17 00:00:00 2001 From: Pekka Helenius Date: Tue, 13 Oct 2020 20:00:45 +0300 Subject: [PATCH] Drop unnecessary 'HttpOnly' value as unit tests do not like it Signed-off-by: Pekka Helenius --- .../bookstore/service/session/BookSameSiteCookieFilter.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bookstore/src/main/java/com/fjordtek/bookstore/service/session/BookSameSiteCookieFilter.java b/bookstore/src/main/java/com/fjordtek/bookstore/service/session/BookSameSiteCookieFilter.java index 07bfd5a..9c0cbda 100644 --- a/bookstore/src/main/java/com/fjordtek/bookstore/service/session/BookSameSiteCookieFilter.java +++ b/bookstore/src/main/java/com/fjordtek/bookstore/service/session/BookSameSiteCookieFilter.java @@ -30,7 +30,11 @@ public class BookSameSiteCookieFilter extends GenericFilterBean { throws IOException, ServletException { HttpServletResponse httpResponse = (HttpServletResponse) responseData; - httpResponse.setHeader("Set-Cookie", "HttpOnly; SameSite=strict;"); + /* + * Unnecessary, already set 'HttpOnly' cookie string removed. + * Unit tests do not like it (colon separation maybe?) + */ + httpResponse.setHeader("Set-Cookie", "SameSite=strict;"); chain.doFilter(requestData, responseData); }