Revert "MM-27147 - /cloud api endpoints (#15428)" (#15615)

This reverts commit 88aed7ec9e.
Этот коммит содержится в:
Agniva De Sarker
2020-09-28 12:36:55 +05:30
коммит произвёл GitHub
родитель 88aed7ec9e
Коммит 85b434c50d
15 изменённых файлов: 8 добавлений и 296 удалений

Просмотреть файл

@@ -162,18 +162,12 @@ func (h Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Strict-Transport-Security", fmt.Sprintf("max-age=%d", *c.App.Config().ServiceSettings.TLSStrictTransportMaxAge))
}
cloudCSP := ""
if c.App.Srv().License() != nil && *c.App.Srv().License().Features.Cloud {
cloudCSP = " js.stripe.com/v3"
}
if h.IsStatic {
// Instruct the browser not to display us in an iframe unless is the same origin for anti-clickjacking
w.Header().Set("X-Frame-Options", "SAMEORIGIN")
// Set content security policy. This is also specified in the root.html of the webapp in a meta tag.
w.Header().Set("Content-Security-Policy", fmt.Sprintf(
"frame-ancestors 'self'; script-src 'self' cdn.rudderlabs.com%s%s",
cloudCSP,
"frame-ancestors 'self'; script-src 'self' cdn.rudderlabs.com%s",
h.cspShaDirective,
))
} else {