mirror of
https://github.com/gravitational/teleport.git
synced 2026-11-03 16:38:35 +08:00
* Refactors httpheaders.go to use a map[string][]string instead of a map[string]string. This allows us to more easily stack multiple values for the same csp directive. * adds dedup * uses utils.Deduplicate * caches result of getIndexContentSecurityPolicy to improve performance * Adds caching for SetAppLaunchContentSecurityPolicy * moves caching to before combineCSPMaps so that we actually get significant improvements * adds caching to SetRedirectPageContentSecurityPolicy * make caches goroutine safe * use an RWMutex because there are many more reads than writes * Update lib/httplib/httpheaders.go Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com> --------- Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>