Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
atlas
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dataplatform
atlas
Commits
1927b32b
Commit
1927b32b
authored
7 years ago
by
nixonrodrigues
Committed by
Madhan Neethiraj
7 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-2500: added additional headers in HTTP response
Signed-off-by:
Madhan Neethiraj
<
madhan@apache.org
>
parent
809a99c8
master
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
AtlasAuthenticationFilter.java
...g/apache/atlas/web/filters/AtlasAuthenticationFilter.java
+3
-0
AtlasKnoxSSOAuthenticationFilter.java
...e/atlas/web/filters/AtlasKnoxSSOAuthenticationFilter.java
+4
-0
No files found.
webapp/src/main/java/org/apache/atlas/web/filters/AtlasAuthenticationFilter.java
View file @
1927b32b
...
...
@@ -346,6 +346,9 @@ public class AtlasAuthenticationFilter extends AuthenticationFilter {
HttpServletResponse
httpResponse
=
(
HttpServletResponse
)
response
;
AtlasResponseRequestWrapper
responseWrapper
=
new
AtlasResponseRequestWrapper
(
httpResponse
);
responseWrapper
.
setHeader
(
"X-Frame-Options"
,
"DENY"
);
responseWrapper
.
setHeader
(
"X-Content-Type-Options"
,
"nosniff"
);
responseWrapper
.
setHeader
(
"X-XSS-Protection"
,
"1; mode=block"
);
responseWrapper
.
setHeader
(
"Strict-Transport-Security"
,
"max-age=31536000; includeSubDomains"
);
if
(
headerProperties
!=
null
)
{
for
(
String
headerKey
:
headerProperties
.
stringPropertyNames
())
{
...
...
This diff is collapsed.
Click to expand it.
webapp/src/main/java/org/apache/atlas/web/filters/AtlasKnoxSSOAuthenticationFilter.java
View file @
1927b32b
...
...
@@ -137,6 +137,10 @@ public class AtlasKnoxSSOAuthenticationFilter implements Filter {
AtlasResponseRequestWrapper
responseWrapper
=
new
AtlasResponseRequestWrapper
(
httpResponse
);
responseWrapper
.
setHeader
(
"X-Frame-Options"
,
"DENY"
);
responseWrapper
.
setHeader
(
"X-Content-Type-Options"
,
"nosniff"
);
responseWrapper
.
setHeader
(
"X-XSS-Protection"
,
"1; mode=block"
);
responseWrapper
.
setHeader
(
"Strict-Transport-Security"
,
"max-age=31536000; includeSubDomains"
);
if
(!
ssoEnabled
)
{
filterChain
.
doFilter
(
servletRequest
,
servletResponse
);
...
...
This diff is collapsed.
Click to expand it.
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