Skip to content
This repository was archived by the owner on Jul 31, 2022. It is now read-only.

Commit f0dd231

Browse files
committed
oops http only
1 parent 6521ce4 commit f0dd231

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/com/kttdevelopment/simplehttpserver/SimpleHttpExchangeImpl.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,9 @@ public synchronized final HttpSession getHttpSession(){
328328
if((sessionId = cookies.get("__session-id")) == null || !HttpSession.sessions.containsKey(sessionId)){
329329
session = HttpSession.create();
330330
setCookie(
331-
new SimpleHttpCookie.Builder("__session-id",session.getSessionID()).build()
331+
new SimpleHttpCookie.Builder("__session-id",session.getSessionID())
332+
.setHttpOnly(true)
333+
.build()
332334
);
333335
}else{
334336
session = HttpSession.sessions.get(sessionId);

0 commit comments

Comments
 (0)