Skip to content

Commit f773e03

Browse files
author
ExpDev07
committed
fix crash
1 parent dc1f802 commit f773e03

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/main.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import pydantic
1313
import uvicorn
1414
from fastapi.middleware.wsgi import WSGIMiddleware
15+
from fastapi.middleware.cors import CORSMiddleware
1516

1617
from . import models
1718
from .core import create_app
@@ -49,7 +50,7 @@ class Sources(str, enum.Enum):
4950

5051
# Enable CORS.
5152
APP.add_middleware(
52-
fastapi.middleware.cors.CORSMiddleware,
53+
CORSMiddleware,
5354
allow_credentials=True,
5455
allow_origins=['*'],
5556
allow_methods=['*'],

0 commit comments

Comments
 (0)