Set header for share type when not specified

This commit is contained in:
Daniel Ponte 2025-01-22 22:37:49 -05:00
parent f5a238bccb
commit 5ae5461eab

View file

@ -128,6 +128,7 @@ func (sa *shareAPI) routeShare(w http.ResponseWriter, r *http.Request) {
} }
var rType ShareRequestType var rType ShareRequestType
if params.Type != nil { if params.Type != nil {
rType = ShareRequestType(*params.Type) rType = ShareRequestType(*params.Type)
} else { } else {
@ -138,6 +139,7 @@ func (sa *shareAPI) routeShare(w http.ResponseWriter, r *http.Request) {
case shares.EntityIncident: case shares.EntityIncident:
rType = ShareRequestIncident rType = ShareRequestIncident
} }
w.Header().Set("X-Share-Type", string(rType))
} }
if !rType.IsValid() { if !rType.IsValid() {