mirror of
https://github.com/grafana/grafana.git
synced 2025-08-06 20:59:35 +08:00

* Draft: Feature: Trusted Types support * remove trusted-types package * Create policy before jQuery and Angular is loaded and add feature flag * Add trustedTypePolicies * Sanitize scriptURL * Add TT meta tag for test env * Move trusted types into core * Add DOMParser support for TrustedHTML * Seperate RSS sanitization and add better TrustedHTML support * Get test CSP header from config * Remove dompurify dep from core * Add documentation for trusted types * Apply suggestions from code review Co-authored-by: Kristian Bremberg <114284895+KristianGrafana@users.noreply.github.com> * Add comment about Github discussion thread and things breaking * Remove changes from News panel * Remove TT feature toggle * Expose TT and CSPReportOnly to frontend * Log errors in console when CSP report only is enabled * Log error for reporting and remove test mode * Only insert CSP header in HTML for dev env * Update docs --------- Co-authored-by: Tobias Skarhed <tobias.skarhed@gmail.com> Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
39 lines
1.4 KiB
Go
39 lines
1.4 KiB
Go
package dtos
|
|
|
|
import (
|
|
"html/template"
|
|
|
|
"github.com/grafana/grafana/pkg/services/navtree"
|
|
"github.com/grafana/grafana/pkg/setting"
|
|
)
|
|
|
|
type IndexViewData struct {
|
|
User *CurrentUser
|
|
Settings *FrontendSettingsDTO
|
|
AppUrl string
|
|
AppSubUrl string
|
|
GoogleAnalyticsId string
|
|
GoogleAnalytics4Id string
|
|
GoogleAnalytics4SendManualPageViews bool
|
|
GoogleTagManagerId string
|
|
NavTree *navtree.NavTreeRoot
|
|
BuildVersion string
|
|
BuildCommit string
|
|
Theme string
|
|
NewGrafanaVersionExists bool
|
|
NewGrafanaVersion string
|
|
AppName string
|
|
AppNameBodyClass string
|
|
FavIcon template.URL
|
|
AppleTouchIcon template.URL
|
|
AppTitle string
|
|
Sentry *setting.Sentry
|
|
ContentDeliveryURL string
|
|
LoadingLogo template.URL
|
|
CSPContent string
|
|
CSPEnabled bool
|
|
IsDevelopmentEnv bool
|
|
// Nonce is a cryptographic identifier for use with Content Security Policy.
|
|
Nonce string
|
|
}
|