Skip to content

Commit

Permalink
Adding attempts to address the CORS policy.
Browse files Browse the repository at this point in the history
This was not solved, but I wanted to save my efforts here in case we return to issue #186.
  • Loading branch information
jblehr committed Sep 5, 2023
1 parent 4a67476 commit 1006fe6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions trails-viz-api/trailsvizapi/controller/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
from trailsvizapi.repository import projects_and_sites


# @app.after_request
# def add_cors_headers(response):
# response.headers["Access-Control-Allow-Origin"] = "http://localhost:8080"
# response.headers["Access-Control-Allow-Headers"] = "Content-Type"
# return response


@app.route('/api/projects')
def get_all_projects():
return jsonify(app_config.PROJECT_NAMES)
Expand Down

0 comments on commit 1006fe6

Please sign in to comment.