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
|
|
@ -26,7 +26,7 @@ func (ssh2 *SSH2) HandleRoute(ctx context.Context, path string) (http.Handler, e
|
|||
}
|
||||
|
||||
// find the host
|
||||
slug, ok := ssh2.Config.HTTP.SlugFromHost(r.Host)
|
||||
slug, ok := component.GetStill(ssh2).Config.HTTP.SlugFromHost(r.Host)
|
||||
if slug == "" || !ok {
|
||||
httpx.TextInterceptor.Intercept(w, r, httpx.ErrNotFound)
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue