Skip to content

Commit d811e66

Browse files
Merge pull request #275 from JaneliaSciComp/fix-nginx-error-for-n5s
fix: to enable neuroglancer for n5s, return 404 for /attributes.json
2 parents c069524 + 854ba77 commit d811e66

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

fileglancer/app.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,6 +1181,11 @@ async def simple_login_handler(request: Request, body: dict = Body(...)):
11811181

11821182
return response
11831183

1184+
# Return 404 error at /attributes.json
1185+
# Required for Neuroglancer to be able to render N5 volumes
1186+
@app.get("/attributes.json", include_in_schema=False)
1187+
async def serve_attributes_json():
1188+
raise HTTPException(status_code=404, detail="Not found")
11841189

11851190
# Serve SPA at /* for client-side routing
11861191
# This must be the LAST route registered

0 commit comments

Comments
 (0)