From 5ae5461eab601d35a7f7a841da7286f3d25a5d02 Mon Sep 17 00:00:00 2001 From: Daniel Ponte Date: Wed, 22 Jan 2025 22:37:49 -0500 Subject: [PATCH] Set header for share type when not specified --- pkg/rest/share.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/rest/share.go b/pkg/rest/share.go index 8a726e6..1ffba53 100644 --- a/pkg/rest/share.go +++ b/pkg/rest/share.go @@ -128,6 +128,7 @@ func (sa *shareAPI) routeShare(w http.ResponseWriter, r *http.Request) { } var rType ShareRequestType + if params.Type != nil { rType = ShareRequestType(*params.Type) } else { @@ -138,6 +139,7 @@ func (sa *shareAPI) routeShare(w http.ResponseWriter, r *http.Request) { case shares.EntityIncident: rType = ShareRequestIncident } + w.Header().Set("X-Share-Type", string(rType)) } if !rType.IsValid() {