mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 06:40:54 +03:00
add support for embedding templates and other static resources
This feature is disabled by default and can be enabled using the "bundle" build tag Fixes #823 Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -1352,14 +1352,14 @@ func (s *httpdServer) initializeRouter() {
|
||||
if s.renderOpenAPI {
|
||||
s.router.Group(func(router chi.Router) {
|
||||
router.Use(compressor.Handler)
|
||||
fileServer(router, webOpenAPIPath, http.Dir(s.openAPIPath))
|
||||
serveStaticDir(router, webOpenAPIPath, s.openAPIPath)
|
||||
})
|
||||
}
|
||||
|
||||
if s.enableWebAdmin || s.enableWebClient {
|
||||
s.router.Group(func(router chi.Router) {
|
||||
router.Use(compressor.Handler)
|
||||
fileServer(router, webStaticFilesPath, http.Dir(s.staticFilesPath))
|
||||
serveStaticDir(router, webStaticFilesPath, s.staticFilesPath)
|
||||
})
|
||||
if s.binding.OIDC.isEnabled() {
|
||||
s.router.Get(webOIDCRedirectPath, s.handleOIDCRedirect)
|
||||
|
||||
Reference in New Issue
Block a user