KevanSoon
commited on
Commit
·
4df3d15
1
Parent(s):
e4507fd
adjusted CORS
Browse files
app.py
CHANGED
|
@@ -59,14 +59,13 @@ app = FastAPI(
|
|
| 59 |
# Allow requests from the default React frontend port
|
| 60 |
app.add_middleware(
|
| 61 |
CORSMiddleware,
|
| 62 |
-
allow_origins=["*"]
|
| 63 |
allow_credentials=True,
|
| 64 |
allow_methods=["*"],
|
| 65 |
allow_headers=["*"],
|
| 66 |
)
|
| 67 |
|
| 68 |
|
| 69 |
-
|
| 70 |
security = HTTPBearer()
|
| 71 |
# Load environment variables from a .env file
|
| 72 |
load_dotenv()
|
|
|
|
| 59 |
# Allow requests from the default React frontend port
|
| 60 |
app.add_middleware(
|
| 61 |
CORSMiddleware,
|
| 62 |
+
allow_origins=["https://fair-work-contract.vercel.app"], # or ["*"] for all origins
|
| 63 |
allow_credentials=True,
|
| 64 |
allow_methods=["*"],
|
| 65 |
allow_headers=["*"],
|
| 66 |
)
|
| 67 |
|
| 68 |
|
|
|
|
| 69 |
security = HTTPBearer()
|
| 70 |
# Load environment variables from a .env file
|
| 71 |
load_dotenv()
|