We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1ca0207 commit b2d20f4Copy full SHA for b2d20f4
1 file changed
backend/main.py
@@ -1,10 +1,20 @@
1
from utils.get_contradictory_news import get_contradiction_news
2
+from fastapi.middleware.cors import CORSMiddleware
3
from fastapi import FastAPI
4
from pydantic import BaseModel
5
import os
6
7
app = FastAPI()
8
9
+
10
+app.add_middleware(
11
+ CORSMiddleware,
12
+ allow_origins=["http://localhost:3000","https://pol-con.vercel.app/"],
13
+ allow_credentials=True,
14
+ allow_methods=["*"],
15
+ allow_headers=["*"],
16
+)
17
18
class Politician(BaseModel):
19
name: str
20
0 commit comments