Skip to content

Commit

Permalink
Add CORS allow
Browse files Browse the repository at this point in the history
  • Loading branch information
N-Clerkx committed Dec 19, 2023
1 parent 9d4c13d commit cdb6626
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion App/functions/report-python-cloud-run/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def return_report():
response = make_response(pdf_object.getvalue())
response.headers["Content-Type"] = "application/pdf"
response.headers["Content-Disposition"] = "inline; filename=coastal_report.pdf"
response.headers["Access-Control-Allow-Origin"] = "*" # CORS
return response


Expand All @@ -66,7 +67,9 @@ def return_html():

web_page_content = create_report_html(polygon=polygon, stac_root=stac_root)

return render_template_string(web_page_content)
response = make_response(render_template_string(web_page_content))
response.headers["Access-Control-Allow-Origin"] = "*" # CORS
return response


if __name__ == "__main__":
Expand Down

0 comments on commit cdb6626

Please sign in to comment.