Skip to content

Commit f56e7a5

Browse files
committed
fixup! fixup! fixup! fixup! fixup! Allow serving frontend via backend
1 parent c695a3c commit f56e7a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backend/bracket/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ async def generic_exception_handler(request: Request, exc: Exception) -> JSONRes
165165
async def frontend(full_path: str) -> FileResponse:
166166
p = frontend_root / Path(full_path)
167167

168-
# Checking `str(path) in allowed_paths` should be enough here but we check for more cases
168+
# Checking `str(p) in allowed_paths` should be enough here but we check for more cases
169169
# to be sure and avoid AI tools raising false positives.
170170
if p.exists() and p.is_file() and str(p) in allowed_paths and frontend_root in p.parents:
171171
return FileResponse(p)

0 commit comments

Comments
 (0)