aws-architect 6.6.36 → 6.6.40
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.
|
@@ -90,8 +90,8 @@
|
|
|
90
90
|
{ "Ref": "dnsName" },
|
|
91
91
|
{ "Fn::Sub": "*.${dnsName}" }
|
|
92
92
|
],
|
|
93
|
-
"HttpVersion": "
|
|
94
|
-
"PriceClass": "
|
|
93
|
+
"HttpVersion": "http2and3",
|
|
94
|
+
"PriceClass": "PriceClass_200",
|
|
95
95
|
"Origins": [
|
|
96
96
|
{
|
|
97
97
|
"OriginPath": "/v1",
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
"Enabled": true,
|
|
124
124
|
"ViewerCertificate": {
|
|
125
125
|
"AcmCertificateArn": { "Ref": "AcmCertificate" },
|
|
126
|
-
"MinimumProtocolVersion": "TLSv1.
|
|
126
|
+
"MinimumProtocolVersion": "TLSv1.2_2021",
|
|
127
127
|
"SslSupportMethod": "sni-only"
|
|
128
128
|
},
|
|
129
129
|
"DefaultCacheBehavior": {
|
package/lib/BucketManager.js
CHANGED
|
@@ -178,7 +178,8 @@ class BucketManager {
|
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
180
|
|
|
181
|
-
//
|
|
181
|
+
// Ensures a path will be in unix format (that is, forward slash), also on Windows systems.
|
|
182
|
+
// * On windows the nodejs "path" library incorrectly uses backlash (\) even when we aren't writing to the filesystem. So this fixes the paths since we are writing to S3 in this class
|
|
182
183
|
unixify(fullPath) {
|
|
183
184
|
return fullPath.replace(/\\/g, '/');
|
|
184
185
|
}
|
package/lib/server.js
CHANGED
|
@@ -144,8 +144,11 @@ function Server(contentDirectory, lambdaApi, logger) {
|
|
|
144
144
|
|
|
145
145
|
if (req.method !== 'OPTIONS') {
|
|
146
146
|
try {
|
|
147
|
-
|
|
148
|
-
let result =
|
|
147
|
+
const authorizationEvent = cloneDeep(event);
|
|
148
|
+
let result = { principalId: '<no-authorizer-func-specified>' };
|
|
149
|
+
if (lambdaApi.Authorizer.AuthorizerFunc || lambdaApi.authorizer || lambdaApi.Authorizer) {
|
|
150
|
+
result = await lambdaApi.handler(authorizationEvent, context);
|
|
151
|
+
}
|
|
149
152
|
// AWS authorizers do not accept objects
|
|
150
153
|
if (Object.values(result.context || {}).some(c => typeof c === 'object')) {
|
|
151
154
|
throw Error('AuthorizerContextPropertieValuesMustBeConvertableToString');
|