Ali2206 commited on
Commit
79eabc4
·
1 Parent(s): bbc8095

Add no-trailing-slash route to AIAccessibility

Browse files
Files changed (1) hide show
  1. AIAccessibility/app/main.py +6 -0
AIAccessibility/app/main.py CHANGED
@@ -125,6 +125,12 @@ def index() -> FileResponse:
125
  base = os.path.dirname(__file__)
126
  return FileResponse(os.path.join(base, "static", "index.html"))
127
 
 
 
 
 
 
 
128
  @router.get("/health")
129
  def health() -> dict:
130
  return {"status":"ok","openai_key": bool(os.getenv("OPENAI_API_KEY")), "model": os.getenv("OPENAI_MODEL","gpt-4o-mini")}
 
125
  base = os.path.dirname(__file__)
126
  return FileResponse(os.path.join(base, "static", "index.html"))
127
 
128
+ @router.get("")
129
+ def index_no_slash() -> FileResponse:
130
+ """Serve the Accessibility Checker page (no trailing slash)."""
131
+ base = os.path.dirname(__file__)
132
+ return FileResponse(os.path.join(base, "static", "index.html"))
133
+
134
  @router.get("/health")
135
  def health() -> dict:
136
  return {"status":"ok","openai_key": bool(os.getenv("OPENAI_API_KEY")), "model": os.getenv("OPENAI_MODEL","gpt-4o-mini")}