Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -7,19 +7,12 @@ from typing import List
|
|
7 |
|
8 |
app = FastAPI()
|
9 |
|
10 |
-
origins = [
|
11 |
-
"http://127.0.0.1:5500", # Allow your local development origin
|
12 |
-
"http://localhost:5500", # Sometimes localhost might also be used
|
13 |
-
"https://your-frontend-domain.com", # Add your production frontend domain here if applicable
|
14 |
-
"https://do0rmamu-truck-loading-poc.hf.space" # Add your current server URL here
|
15 |
-
]
|
16 |
-
|
17 |
app.add_middleware(
|
18 |
CORSMiddleware,
|
19 |
-
allow_origins=
|
20 |
allow_credentials=True,
|
21 |
-
allow_methods=["*"],
|
22 |
-
allow_headers=["*"],
|
23 |
)
|
24 |
|
25 |
class Box:
|
|
|
7 |
|
8 |
app = FastAPI()
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
app.add_middleware(
|
11 |
CORSMiddleware,
|
12 |
+
allow_origins=["*"], # Allows all origins
|
13 |
allow_credentials=True,
|
14 |
+
allow_methods=["*"],
|
15 |
+
allow_headers=["*"],
|
16 |
)
|
17 |
|
18 |
class Box:
|