Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -2,7 +2,7 @@ import os
|
|
2 |
import re
|
3 |
import logging
|
4 |
from fastapi import FastAPI, HTTPException, BackgroundTasks
|
5 |
-
from fastapi.middleware.cors import CORSMiddleware
|
6 |
from fastapi.responses import StreamingResponse
|
7 |
from fastapi.responses import RedirectResponse
|
8 |
import subprocess
|
@@ -25,15 +25,6 @@ load_dotenv()
|
|
25 |
logging.basicConfig(level=logging.INFO)
|
26 |
logger = logging.getLogger(__name__)
|
27 |
|
28 |
-
# CORS configuration
|
29 |
-
app.add_middleware(
|
30 |
-
CORSMiddleware,
|
31 |
-
allow_origins=["*"],
|
32 |
-
allow_credentials=True,
|
33 |
-
allow_methods=["*"],
|
34 |
-
allow_headers=["*"],
|
35 |
-
)
|
36 |
-
|
37 |
|
38 |
# FastAPI app
|
39 |
app = FastAPI()
|
|
|
2 |
import re
|
3 |
import logging
|
4 |
from fastapi import FastAPI, HTTPException, BackgroundTasks
|
5 |
+
#from fastapi.middleware.cors import CORSMiddleware
|
6 |
from fastapi.responses import StreamingResponse
|
7 |
from fastapi.responses import RedirectResponse
|
8 |
import subprocess
|
|
|
25 |
logging.basicConfig(level=logging.INFO)
|
26 |
logger = logging.getLogger(__name__)
|
27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
|
29 |
# FastAPI app
|
30 |
app = FastAPI()
|