Remove digest from covered components
This commit is contained in:
parent
3a838b4f21
commit
c5b7f7c3e2
4 changed files with 18 additions and 17 deletions
|
@ -16,12 +16,16 @@ import (
|
|||
func Start(keyDir keydirectory.RegistrationDirectory) error {
|
||||
mux := http.NewServeMux()
|
||||
|
||||
validationOptions := httpsig.DefaultValidationOpts()
|
||||
delete(validationOptions.RequiredCoveredComponents, "content-digest")
|
||||
|
||||
verifier := httpsig.Middleware(httpsig.MiddlewareOpts{
|
||||
NonceStorage: inmemory.NewNonceStorage(),
|
||||
KeyDirectory: keyDir,
|
||||
Tag: "auth",
|
||||
Scheme: "http",
|
||||
Authority: "localhost:8080",
|
||||
Authority: "localhost:8001",
|
||||
Validation: &validationOptions,
|
||||
|
||||
OnValidationError: func(ctx context.Context, err error) {
|
||||
fmt.Printf("validation error: %s\n", err)
|
||||
|
@ -34,9 +38,7 @@ func Start(keyDir keydirectory.RegistrationDirectory) error {
|
|||
|
||||
verifyHandler := verifier(getDefaultHandler())
|
||||
|
||||
var handler http.Handler
|
||||
|
||||
handler = rewriteHeaders(verifyHandler)
|
||||
handler := rewriteHeaders(verifyHandler)
|
||||
|
||||
mux.Handle("/auth", handler)
|
||||
mux.Handle("/register", getRegistrationHandler(keyDir))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue