Update main.py
Browse files
main.py
CHANGED
@@ -48,10 +48,10 @@ from fastapi.middleware.cors import CORSMiddleware
|
|
48 |
|
49 |
app.add_middleware(
|
50 |
CORSMiddleware,
|
51 |
-
allow_origins=["https://artixiban-ll3.static.hf.space"], #
|
52 |
allow_credentials=True,
|
53 |
-
allow_methods=["*"],
|
54 |
-
allow_headers=["*"],
|
55 |
)
|
56 |
|
57 |
@app.post("/generate/")
|
|
|
48 |
|
49 |
app.add_middleware(
|
50 |
CORSMiddleware,
|
51 |
+
allow_origins=["https://artixiban-ll3.static.hf.space"], # Allow only this origin
|
52 |
allow_credentials=True,
|
53 |
+
allow_methods=["*"], # Allow all methods (GET, POST, etc.)
|
54 |
+
allow_headers=["*"], # Allow all headers
|
55 |
)
|
56 |
|
57 |
@app.post("/generate/")
|