Closed maxmode closed 4 years ago
@maxmode Thank you !
Released as v1.9.2.
Hey guys! This PR reverted some logic in #33 which fixed a problem with a config like this:
s3Sync:
- bucketName: ${self:custom.siteName}
bucketPrefix: shell/
localDir: build
params:
- '**':
CacheControl: max-age=3600
- 'index.html':
CacheControl: 'max-age=0,no-cache,no-store,must-revalidate'
- 'sw.js':
CacheControl: 'max-age=0,no-cache,no-store,must-revalidate'
In that case, the first key is the glob and needs to be ignored. Is there a different format that was unaccounted for? Perhaps you can post your config, @maxmode?
In case anyone stumbles on this issue the yaml syntax is off in my comment above. There should be indention on the properties after the param keys (doh!):
params:
- '**':
CacheControl: max-age=3600
- 'index.html':
CacheControl: 'max-age=0,no-cache,no-store,must-revalidate'
- 'sw.js':
CacheControl: 'max-age=0,no-cache,no-store,must-revalidate'
The errors were:
MultipleValidationErrors: There were 12 validation errors:
* UnexpectedParameter: Unexpected key '0' found in params
* UnexpectedParameter: Unexpected key '1' found in params
* UnexpectedParameter: Unexpected key '2' found in params
...
The bug was ignoring first entry in parameters configuration.