hunk.code_window: 	newRootHtml = reCSP.ReplaceAllLiteralString(newRootHtml, fmt.Sprintf(
   		`<meta http-equiv=Content-Security-Policy content="script-src 'self' cdn.segment.com/analytics.js/ 'unsafe-eval' 'sha256-%s'">`,
   		base64.StdEncoding.EncodeToString(scriptHash[:]),
   	))
   	// Rewrite the root.html references to `/static/*` to include the given subpath. This
   	// potentially includes a previously injected inline script.
  
hunk.labels: keep replace keep keep keep keep keep
hunk.after_edit: 		`<meta http-equiv="Content-Security-Policy" content="script-src 'self' cdn.segment.com/analytics.js/ 'unsafe-eval' 'sha256-%s'">`,
  
hunk.file_path: utils/subpath.go
hunk.type: replace
file: // Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
  // See License.txt for license information.
  
  package utils
  
  import (
  	"crypto/sha256"
  	"fmt"
  )
  
  func HashSha256(text string) string {
  	hash := sha256.New()
  	hash.Write([]byte(text))
  
  	return fmt.Sprintf("%x", hash.Sum(nil))
  }
  