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
7c3f8a82
Commit
7c3f8a82
authored
Nov 12, 2021
by
vehjelmtvedt
Browse files
Set X-Content-Type-Options header
parent
a48bf6ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/inf226/inchat/Handler.java
View file @
7c3f8a82
...
...
@@ -145,6 +145,8 @@ public class Handler extends AbstractHandler
response
.
addCookie
(
new
Cookie
(
"session"
,
session
.
identity
.
toString
()));
// Set X-Frame-Options header
response
.
setHeader
(
"X-Frame-Options"
,
"SAMEORIGIN"
);
// Set X-Content-Type-Options header
response
.
setHeader
(
"X-Content-Type-Options"
,
"nosniff"
);
final
PrintWriter
out
=
response
.
getWriter
();
// Handle a logged in request.
...
...
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