go-safeweb
go-safeweb copied to clipboard
Make interceptor plugins consistent
As of today interceptors default are constructed in various different ways:
-
NewPlugin
forfetchmetadata
-
Default
forcoop
andcsp
- Just an
Interceptor
literal forstaticheaders
- A pointer
Interceptor
literal forxsrfhtml
-
hostcheck
doesn't have a concept ofDefault
because it requires the user to specify a value - BUT
cors
has aDefault
interceptor that requires the allowed orgins to be constructed.
All of this is quite confusing.