Require access to Still via method
This commit adds a safeguard to accessing the still from a specific component by requiring access via the component.GetStill method.
This commit is contained in:
parent
81fa84c244
commit
8235ea9105
63 changed files with 288 additions and 197 deletions
|
|
@ -30,7 +30,7 @@ func (home *Home) Routes() component.Routes {
|
|||
MatchAllDomains: true,
|
||||
CSRF: false,
|
||||
|
||||
MenuTitle: home.Config.Home.Title,
|
||||
MenuTitle: component.GetStill(home).Config.Home.Title,
|
||||
MenuSticky: true,
|
||||
MenuPriority: component.MenuHome,
|
||||
}
|
||||
|
|
@ -45,7 +45,7 @@ func (home *Home) HandleRoute(ctx context.Context, route string) (http.Handler,
|
|||
dflt.Fallback = home.publicHandler(ctx)
|
||||
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
slug, ok := home.Config.HTTP.NormSlugFromHost(r.Host)
|
||||
slug, ok := component.GetStill(home).Config.HTTP.NormSlugFromHost(r.Host)
|
||||
switch {
|
||||
case !ok:
|
||||
http.NotFound(w, r)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue