Audit changes.
This commit is contained in:
13
hub/app.go
13
hub/app.go
@@ -8,6 +8,7 @@ import (
|
||||
"path/filepath"
|
||||
"vppn/hub/api"
|
||||
|
||||
"git.crumpington.com/lib/go/keyedmutex"
|
||||
"git.crumpington.com/lib/go/webutil"
|
||||
)
|
||||
|
||||
@@ -28,6 +29,9 @@ type App struct {
|
||||
mux *http.ServeMux
|
||||
tmpl map[string]*template.Template
|
||||
insecure bool
|
||||
|
||||
// Per-remote address sign-in serialization lock.
|
||||
signInLock keyedmutex.KeyedMutex[string]
|
||||
}
|
||||
|
||||
func NewApp(conf Config) (*App, error) {
|
||||
@@ -37,10 +41,11 @@ func NewApp(conf Config) (*App, error) {
|
||||
}
|
||||
|
||||
app := &App{
|
||||
api: api,
|
||||
mux: http.NewServeMux(),
|
||||
tmpl: webutil.ParseTemplateSet(templateFuncs, templateFS),
|
||||
insecure: conf.Insecure,
|
||||
api: api,
|
||||
mux: http.NewServeMux(),
|
||||
tmpl: webutil.ParseTemplateSet(templateFuncs, templateFS),
|
||||
insecure: conf.Insecure,
|
||||
signInLock: keyedmutex.New[string](),
|
||||
}
|
||||
|
||||
app.registerRoutes()
|
||||
|
||||
Reference in New Issue
Block a user