Niansuh commited on
Commit
d67acc4
·
verified ·
1 Parent(s): 37f98b0

Update api/app.py

Browse files
Files changed (1) hide show
  1. api/app.py +4 -4
api/app.py CHANGED
@@ -9,15 +9,15 @@ logger = setup_logger(__name__)
9
  def create_app():
10
  app = FastAPI(
11
  title="Production API",
12
- docs_url="/docs", # Customize docs path if necessary
13
- redoc_url="/redoc",
14
- openapi_url="/openapi.json",
15
  )
16
 
17
  # CORS settings
18
  app.add_middleware(
19
  CORSMiddleware,
20
- allow_origins=["*"],
21
  allow_credentials=True,
22
  allow_methods=["*"],
23
  allow_headers=["*"],
 
9
  def create_app():
10
  app = FastAPI(
11
  title="Production API",
12
+ docs_url=None, # Disable Swagger UI
13
+ redoc_url=None, # Disable ReDoc
14
+ openapi_url=None, # Disable OpenAPI schema
15
  )
16
 
17
  # CORS settings
18
  app.add_middleware(
19
  CORSMiddleware,
20
+ allow_origins=["*"], # Adjust as needed for security
21
  allow_credentials=True,
22
  allow_methods=["*"],
23
  allow_headers=["*"],