File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,26 @@ type ConsolePluginSpec struct {
4848 // i18n is the configuration of plugin's localization resources.
4949 // +optional
5050 I18n ConsolePluginI18n `json:"i18n"`
51+ // csp is a list of Content Security Policy directives for the plugin.
52+ CSP []ConsolePluginCSP `json:"csp"`
53+ }
54+
55+ // DirectiveType is an enumeration of supported CSP directives
56+ type DirectiveType string
57+
58+ const (
59+ DefaultSrc DirectiveType = "default-src"
60+ ScriptSrc DirectiveType = "script-src"
61+ ImgSrc DirectiveType = "img-src"
62+ StyleSrc DirectiveType = "style-src"
63+ FontSrc DirectiveType = "font-src"
64+ BaseUri DirectiveType = "base-uri"
65+ )
66+
67+ // ConsolePluginCSP
68+ type ConsolePluginCSP struct {
69+ Directive DirectiveType `json:"directive"`
70+ Sources []string `json:"source"`
5171}
5272
5373// LoadType is an enumeration of i18n loading types
You can’t perform that action at this time.
0 commit comments