env parameters not replaced when using GetLegendGraphic with format json

Description

We are using geoserver 2.15.0. When using the following request, a jpeg is returned in which the env parameters are replaced by actual values:

https://localchost/geoserver/wms?service=WMS&request=GetLegendGraphic&layer=myLayer&format=image/jpeg&env=min:0;max:50&LEGEND_OPTIONS=forceRule:true

When doing the same request with format application/json, the env parameters are not replaced

Environment

None

Status

Assignee

Unassigned

Reporter

N. Smeets

Triage

None

Fix versions

None

Affects versions

2.15.0

Priority

Medium