Skip to content

Commit

Permalink
fix: removed cors (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ninjagod1251 authored Dec 5, 2023
1 parent ce0dda6 commit df797ed
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,23 @@ async def swagger_ui_redirect(req: Request) -> HTMLResponse:
init_openapi(app)

PackageManifest.update_forward_refs()
# app.add_middleware(
# CORSMiddleware,
# allow_origins=[
# # NOTE: When running remix in local dev, this is the URL
# "http://localhost:8080",
# # NOTE: When running `npm run build && npm run preview`, this is the URL
# "http://localhost:4173",
# # NOTE: This is where the UI gets hosted
# "https://remix.ethereum.org",
# "https://remix-alpha.ethereum.org",
# "https://remix-beta.ethereum.org",
# ],
# allow_origin_regex="https://deploy-preview-[0-9]*--remixproject.netlify.app/",
# allow_credentials=True,
# allow_methods=["*"],
# allow_headers=["*"],
# )
app.add_middleware(
CORSMiddleware,
allow_origins=[
# NOTE: When running remix in local dev, this is the URL
"http://localhost:8080",
# NOTE: When running `npm run build && npm run preview`, this is the URL
"http://localhost:4173",
# NOTE: This is where the UI gets hosted
"https://remix.ethereum.org",
"https://remix-alpha.ethereum.org",
"https://remix-beta.ethereum.org",
],
allow_origin_regex="https://deploy-preview-[0-9]*--remixproject.netlify.app/",
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)


class TaskStatus(Enum):
Expand Down

0 comments on commit df797ed

Please sign in to comment.