From 325be0344662a3f6688f1b7d7a39392b59859e56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20Andr=C3=A9s=20Chaparro=20Quintero?= <62714297+PedroChaparro@users.noreply.github.com> Date: Tue, 10 Oct 2023 19:12:58 -0500 Subject: [PATCH] release: v0.0.11 (#45) * fix: Enable all CORS origins (#44) * chore: Remove origins environment variable * fix: Enable all origins in CORS config --- CHANGELOG.md | 9 +++++++++ CLI.md | 7 +++---- Dockerfile | 1 - main.py | 6 +----- package-lock.json | 4 ++-- package.json | 2 +- src/config/environment.py | 1 - 7 files changed, 16 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a50b069..8706aa5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,15 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### 0.0.11 (2023-10-11) + +### 0.0.10 (2023-10-11) + + +### Bug Fixes + +* Enable all CORS origins ([#44](https://github.com/hawks-atlanta/proxy-python/issues/44)) ([9f8ad6a](https://github.com/hawks-atlanta/proxy-python/commit/9f8ad6ae4dee09b18bd7e1f44d36f0c0ee7f4ced)) + ### 0.0.9 (2023-10-09) diff --git a/CLI.md b/CLI.md index 04b6c61..3a078cf 100644 --- a/CLI.md +++ b/CLI.md @@ -4,7 +4,6 @@ This document describes how to use the service as a CLI tool. ## Environment variables -| Variable | Description | Example | -| ----------------- | ------------------------------------------------------ | ------------------------------------------ | -| `GATEWAY_BASEURL` | Base URL of the gateway | `https://gateway:8080` | -| `ALLOWED_ORIGINS` | An string with the allowed origins separated by commas | `https://example.com,https://example2.com` | +| Variable | Description | Example | +| ----------------- | ----------------------- | ---------------------- | +| `GATEWAY_BASEURL` | Base URL of the gateway | `https://gateway:8080` | diff --git a/Dockerfile b/Dockerfile index bacbdbd..f78f500 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,5 +6,4 @@ COPY . . USER application RUN pip install -r requirements.txt ENV GATEWAY_BASEURL "http://gateway:8080" -ENV ALLOWED_ORIGINS "http://localhost:5173" ENTRYPOINT ["python", "-m", "flask", "-A", "./main.py", "run", "--host", "0.0.0.0", "--port", "8080"] \ No newline at end of file diff --git a/main.py b/main.py index b7e2b7e..19c6768 100644 --- a/main.py +++ b/main.py @@ -1,14 +1,10 @@ import flask from flask_cors import CORS from src.views import views -from src.config.environment import variables app = flask.Flask(__name__) app.register_blueprint(views) - -allowed_origins_list = variables["ALLOWED_ORIGINS"].split(",") - -CORS(app, resources={r"/*": {"origins": allowed_origins_list}}) +CORS(app, resources={r"/*": {"origins": "*"}}) if __name__ == "__main__": app.run(debug=True) diff --git a/package-lock.json b/package-lock.json index 4f7d9e6..9149c7d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { "name": "frontend-python", - "version": "0.0.9", + "version": "0.0.11", "lockfileVersion": 3, "requires": true, "packages": { "": { - "version": "0.0.9", + "version": "0.0.11", "devDependencies": { "git-semver-tags": "^4.1.1", "standard-version": "^9.5.0" diff --git a/package.json b/package.json index 65fd999..90587f1 100644 --- a/package.json +++ b/package.json @@ -3,5 +3,5 @@ "git-semver-tags": "^4.1.1", "standard-version": "^9.5.0" }, - "version": "0.0.9" + "version": "0.0.11" } diff --git a/src/config/environment.py b/src/config/environment.py index f2724f4..5f7962d 100644 --- a/src/config/environment.py +++ b/src/config/environment.py @@ -2,5 +2,4 @@ variables = { "GATEWAY_BASEURL": os.getenv("GATEWAY_BASEURL", "http://localhost:8080"), - "ALLOWED_ORIGINS": os.getenv("ALLOWED_ORIGINS", "http://localhost:5173"), }