Skip to content

Commit 233a89a

Browse files
committed
Allow cors
1 parent 4a61f73 commit 233a89a

File tree

1 file changed

+5
-1
lines changed
  • App/functions/delta-dtm-transsect-plot/src

1 file changed

+5
-1
lines changed

App/functions/delta-dtm-transsect-plot/src/main.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,12 @@ async def line_plot(
8888
return Response(
8989
content=buf.getvalue(),
9090
media_type="image/png",
91-
headers={"Content-Disposition": 'attachment; filename="transect_plot.png"'},
91+
headers={
92+
"Content-Disposition": 'attachment; filename="transect_plot.png"',
93+
"Access-Control-Allow-Origin": "*",
94+
},
9295
)
96+
9397
except Exception as e:
9498
# Log the error
9599
print("Error generating plot:")

0 commit comments

Comments
 (0)