Skip to content

Commit

Permalink
changed CORS to allowedorigins to support multiple urls (bcgov#2227)
Browse files Browse the repository at this point in the history
  • Loading branch information
saravanpa-aot authored Sep 20, 2023
1 parent c82c53f commit 42c3e33
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion met-api/src/met_api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from met_api.models.tenant import Tenant as TenantModel
from met_api.utils import constants
from met_api.utils.cache import cache
from met_api.utils.util import allowedorigins

# Security Response headers
csp = (
Expand Down Expand Up @@ -50,7 +51,7 @@ def create_app(run_mode=os.getenv('FLASK_ENV', 'development')):
# All configuration are in config file
app.config.from_object(get_named_config(run_mode))

# CORS(app, origins=os.getenv('SITE_URL'), supports_credentials=True)
CORS(app, origins=allowedorigins(), supports_credentials=True)

# Register blueprints
app.register_blueprint(API_BLUEPRINT)
Expand Down

0 comments on commit 42c3e33

Please sign in to comment.