google/go-safeweb

Make sure that no two given configs apply to the same interceptor

empijei opened this issue · 0 comments

This is a TODO expressed here:

go-safeweb/safehttp/mux.go

Lines 225 to 233 in d29986c

var cfg InterceptorConfig
for _, c := range cfgs {
if c.Match(it) {
// TODO: there should be a validation check that there is at
// most one config per interceptor.
cfg = c
break
}
}

We should either panic there, or require configs to be somehow mergeable.