@fishawack/lab-env 4.38.0 → 4.38.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  ## Changelog
2
2
 
3
+ ### 4.38.1 (2025-04-15)
4
+
5
+ #### Bug Fixes
6
+
7
+ * added security headings to auth response ([e8e75dd](https://bitbucket.org/fishawackdigital/lab-env/commits/e8e75dd8276a365f06b154e2b4cb83fd475efb92))
8
+ * set hsts header on www redirect in cloudfront request ([4d9ed98](https://bitbucket.org/fishawackdigital/lab-env/commits/4d9ed98f82d7e02a45e85a692b3d23aa2db3e336))
9
+
3
10
  ### 4.38.0 (2024-11-21)
4
11
 
5
12
  #### Features
@@ -12,7 +12,10 @@ function handler(event) {
12
12
  var response = {
13
13
  statusCode: 301,
14
14
  statusDescription: 'Moved Permanently',
15
- headers: { "location": { "value": `https://${event.request.headers.host.value.split('www.')[1]}${event.request.uri}${query}` } }
15
+ headers: {
16
+ "location": { "value": `https://${event.request.headers.host.value.split('www.')[1]}${event.request.uri}${query}` },
17
+ "strict-transport-security": { "value": "max-age=31536000; includeSubDomains"}
18
+ }
16
19
  };
17
20
 
18
21
  return response;
@@ -67,9 +70,11 @@ function handler(event) {
67
70
  statusCode: 401,
68
71
  statusDescription: 'Unauthorized',
69
72
  headers: {
70
- "www-authenticate": {
71
- value: 'Basic'
72
- }
73
+ "www-authenticate": { value: 'Basic' },
74
+ 'strict-transport-security': { value: 'max-age=31536000; includeSubDomains'},
75
+ 'content-security-policy': { value: "default-src 'self' https: data: 'unsafe-inline';"},
76
+ 'x-content-type-options': { value: 'nosniff'},
77
+ 'x-frame-options': {value: 'sameorigin'}
73
78
  },
74
79
  };
75
80
 
@@ -12,7 +12,10 @@ function handler(event) {
12
12
  var response = {
13
13
  statusCode: 301,
14
14
  statusDescription: 'Moved Permanently',
15
- headers: { "location": { "value": `https://${event.request.headers.host.value.split('www.')[1]}${event.request.uri}${query}` } }
15
+ headers: {
16
+ "location": { "value": `https://${event.request.headers.host.value.split('www.')[1]}${event.request.uri}${query}` },
17
+ "strict-transport-security": { "value": "max-age=31536000; includeSubDomains"}
18
+ }
16
19
  };
17
20
 
18
21
  return response;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fishawack/lab-env",
3
- "version": "4.38.0",
3
+ "version": "4.38.1",
4
4
  "description": "Docker manager for FW",
5
5
  "main": "cli.js",
6
6
  "scripts": {