Browse Source

Server version to response, cleanup

Vova Tkach 6 years ago
parent
commit
bce3656efc
2 changed files with 3 additions and 3 deletions
  1. 1 0
      constants/constants.go
  2. 2 3
      main.go

+ 1 - 0
constants/constants.go

@@ -1,4 +1,5 @@
 package constants
 
 const Debug = !false
+const ServerVersion = "1.0.1"
 const AssetsVersion = "3"

+ 2 - 3
main.go

@@ -12,7 +12,7 @@ import (
 	"strings"
 	"time"
 
-	//"golang-fave/constants"
+	"golang-fave/constants"
 	"golang-fave/engine/actions"
 	"golang-fave/engine/wrapper"
 )
@@ -112,10 +112,9 @@ func handler(w http.ResponseWriter, r *http.Request) {
 	r.URL.Scheme = "http"
 
 	// Set server name
-	w.Header().Set("Server", "fave.pro")
+	w.Header().Set("Server", "fave.pro/"+constants.ServerVersion)
 
 	// Create and start engine
-	//wrapper.New(&w, r, host, port, ParamWwwDir, VhostHomeDir, C_Debug).
 	wrapper.New(&w, r, host, port, ParamWwwDir, VhostHomeDir).
 		Run(func(wrapper *wrapper.Wrapper) bool {
 			// Actions