Preserve private asset metadata headers and verify cross-project adoption
This commit is contained in:
@@ -312,7 +312,9 @@ func (s *service) getAssetMetadata(w http.ResponseWriter, r *http.Request, proje
|
||||
}
|
||||
info.URL = s.assetURL(project, workspace, id)
|
||||
w.Header().Set("Cache-Control", "private, no-store")
|
||||
reply(w, 200, response{"metadata_version": 1, "asset": info, "sha256": digest})
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
w.WriteHeader(http.StatusOK)
|
||||
_ = json.NewEncoder(w).Encode(response{"metadata_version": 1, "asset": info, "sha256": digest})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user