File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -663,7 +663,7 @@ def cert_chain(
663663 raise HTTPException (status_code = 404 , detail = f"{ pem } not found" )
664664
665665
666- @app .get (f"/{ API_PREFIX } attachments/{{path:path}}" )
666+ @app .api_route (f"/{ API_PREFIX } attachments/{{path:path}}" , methods = [ "GET" , "HEAD" ] )
667667def attachments (
668668 request : Request ,
669669 path : str ,
Original file line number Diff line number Diff line change @@ -458,6 +458,11 @@ def test_attachment_real_file(api_client):
458458 assert len (resp .content ) == 1000
459459
460460
461+ def test_attachment_supports_head (api_client ):
462+ resp = api_client .head ("/v2/attachments/main-workspace/regions/world.geojson" )
463+ assert resp .status_code == 200
464+
465+
461466def test_attachment_mimetype (api_client ):
462467 resp = api_client .get ("/v2/attachments/main-workspace/regions/world.geojson" )
463468 assert resp .status_code == 200
You can’t perform that action at this time.
0 commit comments