Skip to content

Commit d2ae95f

Browse files
removed unwanted code
1 parent dd1dd21 commit d2ae95f

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

src/main/java/com/iemr/common/utils/CookieUtil.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,7 @@ public void addJwtTokenToCookie(String Jwttoken, HttpServletResponse response, H
3939

4040
// Set the SameSite attribute for cross-site request handling (if needed)
4141
String sameSite = "None"; // Allow cross-site cookies (can be 'Strict', 'Lax', or 'None')
42-
if ("https".equalsIgnoreCase(request.getScheme())) {
43-
// Set Secure flag for HTTPS connection and SameSite=None for cross-site support
44-
cookie.setSecure(true); // Enable cookie only on HTTPS
45-
} else {
46-
cookie.setSecure(true); // No need for Secure flag on HTTP connections
47-
}
48-
42+
cookie.setSecure(true);
4943
// Add the cookie to the response
5044
response.addCookie(cookie);
5145

0 commit comments

Comments
 (0)