Skip to content

Commit

Permalink
add allowed origins
Browse files Browse the repository at this point in the history
  • Loading branch information
robswc committed Mar 19, 2023
1 parent 1efb24b commit 3c952cf
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,16 @@
title="Stratis API",
)

allowed_origins = [
"http://localhost",
"http://localhost:8000",
"http://localhost:3000",
]

# handle CORS
app.add_middleware(
CORSMiddleware,
allow_origins=["*"],
allow_origins=allowed_origins,
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
Expand Down

0 comments on commit 3c952cf

Please sign in to comment.