Added authentication middleware

This commit is contained in:
2025-02-11 23:46:25 +11:00
parent 97aabcf06f
commit 732f8510ae
12 changed files with 208 additions and 21 deletions

View File

@@ -27,7 +27,7 @@ func NewServer(
// Add middleware here, must be added in reverse order of execution
// i.e. First in list will get executed last during the request handling
handler = middleware.Logging(logger, handler)
handler = middleware.Authentication(logger, handler)
handler = middleware.Authentication(logger, config, conn, handler)
// Serve the favicon and exluded files before any middleware is added
handler = middleware.ExcludedFiles(handler)