Skip to content

Commit d4129fd

Browse files
committed
minor fix for CORS headers
1 parent 985a840 commit d4129fd

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ docker-push: ## Push Docker image to registry
6868
docker-push-master:## Push Docker image to registry IF we are currently on the master branch
6969
(CURRENT_BRANCH=`(git rev-parse --abbrev-ref HEAD | grep '^master$$' || ((git branch -a | grep 'HEAD detached at') && git branch -a)) | grep '^[* ]*master$$' | sed 's/[* ]//g' || true`; \
7070
test "$$CURRENT_BRANCH" != 'master' && echo "Not on master branch.") || \
71-
((test "$$DOCKER_USERNAME" == '' || test "$$DOCKER_PASSWORD" == '' ) && echo "Skipping docker push as no credentials are provided.") || \
71+
((test "$$DOCKER_USERNAME" = '' || test "$$DOCKER_PASSWORD" = '' ) && echo "Skipping docker push as no credentials are provided.") || \
7272
(REMOTE_ORIGIN="`git remote -v | grep '/localstack' | grep origin | grep push | awk '{print $$2}'`"; \
7373
test "$$REMOTE_ORIGIN" != 'https://github.com/localstack/localstack.git' && echo "This is a fork and not the main repo.") || \
7474
(which $(PIP_CMD) || (wget https://bootstrap.pypa.io/get-pip.py && python get-pip.py); \

localstack/services/generic_proxy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def forward(self, method):
157157
self.send_header('Content-Length', '%s' % len(response.content))
158158

159159
# allow pre-flight CORS headers by default
160-
if method == 'OPTIONS':
160+
if 'Access-Control-Allow-Origin' not in response.headers:
161161
self.send_header('Access-Control-Allow-Origin', '*')
162162

163163
self.end_headers()

0 commit comments

Comments
 (0)