Uhhy commited on
Commit
c4a3fe6
·
verified ·
1 Parent(s): 571c3e6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py CHANGED
@@ -20,6 +20,16 @@ load_dotenv()
20
 
21
  app = FastAPI()
22
 
 
 
 
 
 
 
 
 
 
 
23
  class Proxy(BaseModel):
24
  ip: str
25
  port: str
 
20
 
21
  app = FastAPI()
22
 
23
+ origins = ["*"]
24
+
25
+ app.add_middleware(
26
+ CORSMiddleware,
27
+ allow_origins=origins,
28
+ allow_credentials=True,
29
+ allow_methods=["*"],
30
+ allow_headers=["*"],
31
+ )
32
+
33
  class Proxy(BaseModel):
34
  ip: str
35
  port: str