Documentation
¶
Overview ¶
Package contentdigest implements RFC 9530 Content-Digest verification and response generation. It is opt-in and does not affect fh's default hot path.
Index ¶
Constants ¶
View Source
const ( SHA256 = "sha-256" SHA512 = "sha-512" )
Variables ¶
Functions ¶
func New ¶
func New(config ...Config) fh.HandlerFunc
New verifies a request Content-Digest whenever the field is present. It can require the field and can add a response digest always or when requested by Want-Content-Digest.
Types ¶
type ResponseMode ¶
type ResponseMode uint8
const ( ResponseNone ResponseMode = iota ResponseWhenRequested ResponseAlways )
Click to show internal directories.
Click to hide internal directories.