Gaykar commited on
Commit
09740ff
·
verified ·
1 Parent(s): dfe7476

Update app.py

Browse files

Making public API

Files changed (1) hide show
  1. app.py +3 -8
app.py CHANGED
@@ -23,17 +23,12 @@ class EmailRequest(BaseModel):
23
  app = FastAPI(title="Phishing Detection API")
24
 
25
  # Define the specific origins that are allowed to call this API
26
- origins = [
27
- "http://localhost:3000", # React/Frontend local development
28
- "http://127.0.0.1:5500", # VS Code Live Server default
29
- "http://127.0.0.1:8500", # Your FastAPI local address
30
- "http://localhost:5500", # Alternative Live Server address
31
- ]
32
 
33
  app.add_middleware(
34
  CORSMiddleware,
35
- allow_origins=origins, # Only allow the domains in the list above
36
- allow_credentials=True,
37
  allow_methods=["*"], # Allows all HTTP methods (POST, GET, etc.)
38
  allow_headers=["*"], # Allows all headers (Content-Type, etc.)
39
  )
 
23
  app = FastAPI(title="Phishing Detection API")
24
 
25
  # Define the specific origins that are allowed to call this API
26
+
 
 
 
 
 
27
 
28
  app.add_middleware(
29
  CORSMiddleware,
30
+ allow_origins=["*"], # Only allow the domains in the list above
31
+ allow_credentials=False,
32
  allow_methods=["*"], # Allows all HTTP methods (POST, GET, etc.)
33
  allow_headers=["*"], # Allows all headers (Content-Type, etc.)
34
  )