You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 15, 2020. It is now read-only.
CLOUDSTACK-7063, CLOUDSTACK-7064: Add security headers on HTTP response
- Adds X-XSS-Protection header
- Adds X-Content-Type-Options header
- Fixes to use json content type defined from global settings
- Uses secure cookie if enabled in global settings
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit b6b3494)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Copy file name to clipboardExpand all lines: server/src/com/cloud/configuration/Config.java
+12-3Lines changed: 12 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1592,13 +1592,22 @@ public enum Config {
1592
1592
"Percentage (as a value between 0 and 1) of connected agents after which agent load balancing will start happening",
1593
1593
null),
1594
1594
1595
-
JavaScriptDefaultContentType(
1595
+
JSONDefaultContentType(
1596
1596
"Advanced",
1597
1597
ManagementServer.class,
1598
1598
String.class,
1599
1599
"json.content.type",
1600
-
"text/javascript",
1601
-
"Http response content type for .js files (default is text/javascript)",
1600
+
"application/json; charset=UTF-8",
1601
+
"Http response content type for JSON",
1602
+
null),
1603
+
1604
+
EnableSecureSessionCookie(
1605
+
"Advanced",
1606
+
ManagementServer.class,
1607
+
Boolean.class,
1608
+
"enable.secure.session.cookie",
1609
+
"false",
1610
+
"Session cookie's secure flag is enabled if true. Use this only when using HTTPS",
1602
1611
null),
1603
1612
1604
1613
DefaultMaxDomainUserVms("Domain Defaults", ManagementServer.class, Long.class, "max.domain.user.vms", "40", "The default maximum number of user VMs that can be deployed for a domain", null),
0 commit comments