Skip to content

Commit

Permalink
modify CORS
Browse files Browse the repository at this point in the history
  • Loading branch information
Connor Bechthold committed Sep 14, 2023
1 parent 08a8298 commit aaa79bf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backend/app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ def create_app(config_name="development"):
if type(config_name) is not ScriptInfo:
app.config.from_object(app_config[config_name])

app.config["CORS_ORIGINS"] = [
allowed_origins = [
"http://localhost:3000",
"https://blueprintsupportivehousing.firebaseapp.com",
"https://blueprintsupportivehousing.web.app",
re.compile("^https:\/\/blueprint-supportive-housing--pr.*\.web\.app$"),
]
app.config["CORS_SUPPORTS_CREDENTIALS"] = True
CORS(app)

CORS(app, resources={r"/*": {"origins": allowed_origins}}, supports_credentials=True)

if os.getenv("FLASK_CONFIG") != "production":
app.config[
Expand Down

0 comments on commit aaa79bf

Please sign in to comment.