From 854ba7722aa8c0a8ae176460187a232775507e9f Mon Sep 17 00:00:00 2001 From: allison-truhlar Date: Thu, 18 Dec 2025 15:29:21 -0500 Subject: [PATCH] fix: to enable neuroglancer for n5s, return 404 for /attributes.json --- fileglancer/app.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fileglancer/app.py b/fileglancer/app.py index e647542f..5b2beeec 100644 --- a/fileglancer/app.py +++ b/fileglancer/app.py @@ -1181,6 +1181,11 @@ async def simple_login_handler(request: Request, body: dict = Body(...)): return response + # Return 404 error at /attributes.json + # Required for Neuroglancer to be able to render N5 volumes + @app.get("/attributes.json", include_in_schema=False) + async def serve_attributes_json(): + raise HTTPException(status_code=404, detail="Not found") # Serve SPA at /* for client-side routing # This must be the LAST route registered