Versions in this module Expand all Collapse all v1 v1.0.1 Jun 16, 2021 v1.0.0 Jun 11, 2021 Changes in this version + var ErrInvalidContentType = errors.New("invalid content type") + var ErrInvalidHeader = errors.New("invalid X-Content-Security header") + var ErrInvalidKey = errors.New("invalid key") + var ErrInvalidPublicKey = errors.New("invalid public key") + var ErrInvalidSecret = errors.New("invalid secret") + func VerifySignature(r *http.Request, securityHeader *ContentSecurityHeader, ...) int + type ContentSecurityHeader struct + ContentType int + Key []byte + Signature string + Timestamp string + func ParseContentSecurity(decrypters map[string]codec.RsaDecrypter, r *http.Request) (*ContentSecurityHeader, error) + func (h *ContentSecurityHeader) Encrypted() bool + type WithCodeResponseWriter struct + Code int + Writer http.ResponseWriter + func (w *WithCodeResponseWriter) Flush() + func (w *WithCodeResponseWriter) Header() http.Header + func (w *WithCodeResponseWriter) Hijack() (net.Conn, *bufio.ReadWriter, error) + func (w *WithCodeResponseWriter) Write(bytes []byte) (int, error) + func (w *WithCodeResponseWriter) WriteHeader(code int)