MM-23568: Add rudder to server diagnostics. (#14151)
* MM-23568: Add rudder to server diagnostics. * Add unit test. * Go mod tidy. * CSP Header fix. * Fix review comments. * Update web/handlers.go Co-Authored-By: Jesse Hallam <jesse.hallam@gmail.com> * Partially address review comments. * fix tests. * Finish implementing review suggestions and then fixing tests. * Fix CSP Header tests. Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
26310720be
Коммит
6cabc40e62
@@ -152,7 +152,7 @@ func (h Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
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.segment.com/analytics.js/%s",
|
||||
"frame-ancestors 'self'; script-src 'self' cdn.rudderlabs.com cdn.segment.com/analytics.js/%s",
|
||||
h.cspShaDirective,
|
||||
))
|
||||
} else {
|
||||
|
||||
Ссылка в новой задаче
Block a user