Include Location: header in GET Order responses (#8202)

This causes the GET Order polling response to match the NewOrder and
FinalizeOrder responses.

Fixes https://github.com/letsencrypt/boulder/issues/8197
This commit is contained in:
Aaron Gable 2025-05-21 16:21:54 -07:00 committed by GitHub
parent 7ea51e5f91
commit d662c0843d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -2479,6 +2479,10 @@ func (wfe *WebFrontEndImpl) GetOrder(ctx context.Context, logEvent *web.RequestE
response.Header().Set(headerRetryAfter, strconv.Itoa(orderRetryAfter))
}
orderURL := web.RelativeEndpoint(request,
fmt.Sprintf("%s%d/%d", orderPath, acctID, order.Id))
response.Header().Set("Location", orderURL)
err = wfe.writeJsonResponse(response, logEvent, http.StatusOK, respObj)
if err != nil {
wfe.sendError(response, logEvent, probs.ServerInternal("Error marshaling order"), err)