mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 23:00:55 +03:00
move server version setting to common section
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -16,7 +16,6 @@ package httpd
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
@@ -118,11 +117,10 @@ func hasPrefixAndSuffix(key, prefix, suffix string) bool {
|
||||
}
|
||||
|
||||
func getCommonBasePage(r *http.Request) commonBasePage {
|
||||
v := version.Get()
|
||||
return commonBasePage{
|
||||
CSPNonce: secure.CSPNonce(r.Context()),
|
||||
StaticURL: webStaticFilesPath,
|
||||
Version: fmt.Sprintf("v%v-%v", v.Version, v.CommitHash),
|
||||
Version: version.GetServerVersion(" ", true),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user