Documentation
¶
Index ¶
Constants ¶
View Source
const CSPHeaderKey = "Content-Security-Policy"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
DefaultCSPHeader string `json:"defaultCspHeader,omitempty"`
}
func CreateConfig ¶
func CreateConfig() *Config
type DefaultCSPHeaderPlugin ¶
type DefaultCSPHeaderPlugin struct {
// contains filtered or unexported fields
}
func (*DefaultCSPHeaderPlugin) ServeHTTP ¶
func (d *DefaultCSPHeaderPlugin) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP implements http.Handler
type MyResponseWriter ¶
type MyResponseWriter struct { http.ResponseWriter DefaultCSPEntry string }
func (*MyResponseWriter) WriteHeader ¶
func (m *MyResponseWriter) WriteHeader(statusCode int)
Click to show internal directories.
Click to hide internal directories.