Documentation ¶
Index ¶
Constants ¶
View Source
const ( EnvBrowserCSPPolicy = "MINIO_BROWSER_CONTENT_SECURITY_POLICY" EnvBrowserHSTSSeconds = "MINIO_BROWSER_HSTS_SECONDS" EnvBrowserHSTSIncludeSubdomains = "MINIO_BROWSER_HSTS_INCLUDE_SUB_DOMAINS" EnvBrowserHSTSPreload = "MINIO_BROWSER_HSTS_PRELOAD" EnvBrowserReferrerPolicy = "MINIO_BROWSER_REFERRER_POLICY" )
Browser sub-system constants
Variables ¶
View Source
var ( DefaultKVS = config.KVS{ config.KV{ Key: browserCSPPolicy, Value: "default-src 'self' 'unsafe-eval' 'unsafe-inline';", }, config.KV{ Key: browserHSTSSeconds, Value: "0", }, config.KV{ Key: browserHSTSIncludeSubdomains, Value: config.EnableOff, }, config.KV{ Key: browserHSTSPreload, Value: config.EnableOff, }, config.KV{ Key: browserReferrerPolicy, Value: "strict-origin-when-cross-origin", }, } )
DefaultKVS - default storage class config
View Source
var ( Help = config.HelpKVS{ config.HelpKV{ Key: browserCSPPolicy, Description: `set Content-Security-Policy response header value` + defaultHelpPostfix(browserCSPPolicy), Optional: true, Type: "string", }, config.HelpKV{ Key: browserHSTSSeconds, Description: `set Strict-Transport-Security 'max-age' amount of seconds value` + defaultHelpPostfix(browserHSTSSeconds), Optional: true, Type: "number", }, config.HelpKV{ Key: browserHSTSIncludeSubdomains, Description: `turn 'on' to set Strict-Transport-Security 'includeSubDomains' directive` + defaultHelpPostfix(browserHSTSIncludeSubdomains), Optional: true, Type: "boolean", }, config.HelpKV{ Key: browserHSTSPreload, Description: `turn 'on' to set Strict-Transport-Security 'preload' directive` + defaultHelpPostfix(browserHSTSPreload), Optional: true, Type: "boolean", }, config.HelpKV{ Key: browserReferrerPolicy, Description: `set Referrer-Policy response header value` + defaultHelpPostfix(browserReferrerPolicy), Optional: true, Type: "string", }, } )
Help template for browser feature.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { CSPPolicy string `json:"csp_policy"` HSTSSeconds int `json:"hsts_seconds"` HSTSIncludeSubdomains bool `json:"hsts_include_subdomains"` HSTSPreload bool `json:"hsts_preload"` ReferrerPolicy string `json:"referrer_policy"` }
Config storage class configuration
func LookupConfig ¶
LookupConfig - lookup api config and override with valid environment settings if any.
func (*Config) GetCSPolicy ¶
GetCSPolicy - Get the Content security Policy
func (*Config) GetHSTSSeconds ¶
GetHSTSSeconds - Get the Content security Policy
func (*Config) GetReferPolicy ¶
GetReferPolicy - Get the ReferPolicy
func (*Config) IsHSTSIncludeSubdomains ¶
IsHSTSIncludeSubdomains - is HSTS 'includeSubdomains' directive enabled
func (*Config) IsHSTSPreload ¶
IsHSTSPreload - is HSTS 'preload' directive enabled
Click to show internal directories.
Click to hide internal directories.