Skip to content

Commit 44a392e

Browse files
authored
release v0.8.2; fix bug with single S3 CORS rule (localstack#436)
1 parent 820201a commit 44a392e

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@ localstack web
324324

325325
## Change Log
326326

327+
* v0.8.2: Fix S3 bucket notification configuration; CORS headers for API Gateway; fix >128k S3 multipart uploads; return valid ShardIDs in DynamoDB Streams; fix hardcoded "ddblocal" DynamoDB TableARN; import default service ports from localstack-client; fix S3 bucket policy response; Execute lambdas asynchronously if the source is a topic
327328
* v0.8.1: Improvements in Lambda API: publish-version, list-version, function aliases; use single map with Lambda function details; workaround for SQS .fifo queues; add test for S3 upload; initial support for SSM; fix regex to replace SQS queue URL hostnames; update linter (single quotes); use `docker.for.mac.localhost` to connect to LocalStack from Docker on Mac; fix b64 encoding for Java Lambdas; fix path of moto_server command
328329
* v0.8.0: Fix request data in `GenericProxyHandler`; add `$PORT_WEB_UI` and `$HOSTNAME_EXTERNAL` configs; API Gateway path parameters; enable flake8 linting; add config for service backend URLs; use ElasticMQ instead of moto for SQS; expose `$LOCALSTACK_HOSTNAME`; custom environment variable support for Lambda; improve error logging and installation for Java/JUnit; add support for S3 REST Object POST
329330
* v0.7.5: Fix issue with incomplete parallel downloads; bypass http_proxy for internal requests; use native Python code to unzip archives; download KCL client libs only for testing and not on pip install

localstack/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import localstack_client.config
33

44
# LocalStack version
5-
VERSION = '0.8.1'
5+
VERSION = '0.8.2'
66

77
# default AWS region
88
if 'DEFAULT_REGION' not in os.environ:

localstack/services/s3/s3_listener.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,10 @@ def append_cors_headers(bucket_name, request_method, request_headers, response):
193193
if not cors:
194194
return
195195
origin = request_headers.get('Origin', '')
196-
for rule in cors['CORSConfiguration']['CORSRule']:
196+
rules = cors['CORSConfiguration']['CORSRule']
197+
if not isinstance(rules, list):
198+
rules = [rules]
199+
for rule in rules:
197200
allowed_methods = rule.get('AllowedMethod', [])
198201
if request_method in allowed_methods:
199202
allowed_origins = rule.get('AllowedOrigin', [])

0 commit comments

Comments
 (0)