atharvawarade9807 commited on
Commit
b50534a
·
verified ·
1 Parent(s): 8677cf1

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +9 -1
main.py CHANGED
@@ -52,6 +52,14 @@ except Exception as e:
52
  # =====================================================================
53
  # 3. INITIALIZE MASTER APP GATEWAY
54
  # =====================================================================
 
 
 
 
 
 
 
 
55
  app = FastAPI(
56
  title="Master Threat Intelligence Hub Gateway",
57
  description="The ultimate, fully unified routing architecture managing deployments: V1, V2, V3, V4, V5, and V6."
@@ -65,7 +73,7 @@ os.makedirs(OUTPUT_DIR, exist_ok=True)
65
  # =====================================================================
66
  try:
67
  from Version_1.main import app as v1_app
68
- app.include_router(v1_app.router, prefix="/api/v1", tags=["Version 1: Legacy Model"])
69
  print("[+] Successfully merged Version 1 into root UI")
70
  except Exception as e:
71
  print(f"[-] Could not merge Version 1. Error: {e}")
 
52
  # =====================================================================
53
  # 3. INITIALIZE MASTER APP GATEWAY
54
  # =====================================================================
55
+ from fastapi.middleware.cors import CORSMiddleware
56
+ app.add_middleware(
57
+ CORSMiddleware,
58
+ allow_origins=["http://localhost:8000", "http://127.0.0.1:8000"],
59
+ allow_credentials=False,
60
+ allow_methods=["*"],
61
+ allow_headers=["*"],
62
+ )
63
  app = FastAPI(
64
  title="Master Threat Intelligence Hub Gateway",
65
  description="The ultimate, fully unified routing architecture managing deployments: V1, V2, V3, V4, V5, and V6."
 
73
  # =====================================================================
74
  try:
75
  from Version_1.main import app as v1_app
76
+ app.include_router(v1_app.router, tags=["Version 1: Legacy Model"])
77
  print("[+] Successfully merged Version 1 into root UI")
78
  except Exception as e:
79
  print(f"[-] Could not merge Version 1. Error: {e}")