Documentation ¶
Index ¶
Constants ¶
View Source
const ( Header_XFrameOptions = "X-Frame-Options" Default_XFrameOptions = "SAMEORIGIN" Force_XFrameOptions = "" Header_ContentTypeOptions = "X-Content-Type-Options" Default_ContentTypeOptions = "nosniff" Force_ContentTypeOptions = "nosniff" Header_XssProtection = "X-XSS-Protection" Default_XssProtection = "1; mode=block" Force_XssProtection = "1; mode=block" Header_ReferrerPolicy = "Referrer-Policy" Default_ReferrerPolicy = "strict-origin-when-cross-origin" Force_ReferrerPolicy = "" Header_StrictTransportSecurity = "Strict-Transport-Security" Default_StrictTransportSecurity = "max-age=63072000; includeSubDomains; preload" Force_StrictTransportSecurity = "" Header_ContentSecurityPolicy = "Content-Security-Policy" Default_ContentSecurityPolicy = "" Force_ContentSecurityPolicy = "" Header_ContentSecurityPolicyReportOnly = "Content-Security-Policy-Report-Only" Default_ContentSecurityPolicyReportOnly = "" Force_ContentSecurityPolicyReportOnly = "" Header_CrossOriginOpenerPolicy = "Cross-Origin-Opener-Policy" Default_CrossOriginOpenerPolicy = "" Force_CrossOriginOpenerPolicy = "" Header_CrossOriginEmbedderPolicy = "Cross-Origin-Embedder-Policy" Default_CrossOriginEmbedderPolicy = "" Force_CrossOriginEmbedderPolicy = "" Header_CrossOriginResourcePolicy = "Cross-Origin-Resource-Policy" Default_CrossOriginResourcePolicy = "" Force_CrossOriginResourcePolicy = "" Header_PermissionsPolicy = "Permissions-Policy" Default_PermissionsPolicy = "" Force_PermissionsPolicy = "" )
Variables ¶
This section is empty.
Functions ¶
func TestServeHTTP ¶
Types ¶
type Config ¶
type Config struct { SanitizeExposingHeaders bool `json:"sanitizeExposingHeaders"` DefaultHeaders ConfigHeaders `json:"defaultHeaders"` ForceHeaders ConfigHeaders `json:"forceHeaders"` }
Config the plugin configuration.
func CreateConfig ¶
func CreateConfig() *Config
CreateConfig creates the DEFAULT plugin configuration - no access to config yet!
type ConfigHeaders ¶ added in v0.2.0
type ConfigHeaders struct { XFrameOptions string `json:"xframeOptions"` ContentTypeOptions string `json:"contentTypeOptions"` XssProtection string `json:"xssProtection"` ReferrerPolicy string `json:"referrerPolicy"` StrictTransportSecurity string `json:"strictTransportSecurity"` ContentSecurityPolicy string `json:"contentSecurityPolicy"` ContentSecurityPolicyReportOnly string `json:"contentSecurityPolicyReportOnly"` CrossOriginOpenerPolicy string `json:"crossOriginOpenerPolicy"` CrossOriginEmbedderPolicy string `json:"crossOriginEmbedderPolicy"` CrossOriginResourcePolicy string `json:"crossOriginResourcePolicy"` PermissionsPolicy string `json:"permissionsPolicy"` }
type StandardSecurityPlugin ¶
type StandardSecurityPlugin struct { Config *Config // contains filtered or unexported fields }
StandardSecurityPlugin header
func (*StandardSecurityPlugin) ServeHTTP ¶
func (t *StandardSecurityPlugin) ServeHTTP(rw http.ResponseWriter, req *http.Request)
Click to show internal directories.
Click to hide internal directories.