Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Vetle.Hjelmtvedt
inf226-2021-inchat
Commits
e660b96a
Commit
e660b96a
authored
Nov 14, 2021
by
Mathias.Vehus
Browse files
Finished task 0C
parent
8362c28c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/inf226/inchat/Handler.java
View file @
e660b96a
...
...
@@ -154,7 +154,10 @@ public class Handler extends AbstractHandler
final
Stored
<
Account
>
account
=
session
.
value
.
account
;
// User is now logged in with a valid sesion.
// We set the session cookie to keep the user logged in:
response
.
addCookie
(
new
Cookie
(
"session"
,
session
.
identity
.
toString
()));
Cookie
cookie
=
new
Cookie
(
"session"
,
session
.
identity
.
toString
());
cookie
.
setHttpOnly
(
true
);
cookie
.
setSecure
(
true
);
response
.
addCookie
(
cookie
);
// Set X-Frame-Options header
response
.
setHeader
(
"X-Frame-Options"
,
"SAMEORIGIN"
);
// Set X-Content-Type-Options header
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment