control: Generalize cookie and csrf handling
This commit is contained in:
parent
eb17dbe33f
commit
34bdb3cf24
15 changed files with 122 additions and 44 deletions
|
|
@ -25,7 +25,12 @@ var (
|
|||
_ component.Routeable = (*Home)(nil)
|
||||
)
|
||||
|
||||
func (*Home) Routes() []string { return []string{"/"} }
|
||||
func (*Home) Routes() component.Routes {
|
||||
return component.Routes{
|
||||
Paths: []string{"/"},
|
||||
CSRF: false,
|
||||
}
|
||||
}
|
||||
|
||||
func (home *Home) HandleRoute(ctx context.Context, route string) (http.Handler, error) {
|
||||
return home, nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue