Browse Source

Version++

Vova Tkach 5 years ago
parent
commit
02d2484893
4 changed files with 17 additions and 15 deletions
  1. 2 2
      Dockerfile
  2. 1 1
      Makefile
  3. 1 1
      consts/consts_version.go
  4. 13 11
      modules/modules.go

+ 2 - 2
Dockerfile

@@ -3,8 +3,8 @@ MAINTAINER Vova Tkach <vladimirok5959@gmail.com>
 
 ENV FAVE_HOST=0.0.0.0 FAVE_PORT=8080 FAVE_DIR=/app/hosts FAVE_DEBUG=false FAVE_KEEPALIVE=true
 
-ADD https://github.com/vladimirok5959/golang-fave/releases/download/v1.2.4/fave.linux-amd64.tar.gz /app/fave.linux-amd64.tar.gz
-ADD https://github.com/vladimirok5959/golang-fave/releases/download/v1.2.4/localhost.tar.gz /app/hosts/localhost.tar.gz
+ADD https://github.com/vladimirok5959/golang-fave/releases/download/v1.2.5/fave.linux-amd64.tar.gz /app/fave.linux-amd64.tar.gz
+ADD https://github.com/vladimirok5959/golang-fave/releases/download/v1.2.5/localhost.tar.gz /app/hosts/localhost.tar.gz
 
 RUN tar -zxf /app/fave.linux-amd64.tar.gz -C /app && \
  tar -zxf /app/hosts/localhost.tar.gz -C /app/hosts && \

+ 1 - 1
Makefile

@@ -1,4 +1,4 @@
-VERSION="1.2.4"
+VERSION="1.2.5"
 
 default: debug test run
 

+ 1 - 1
consts/consts_version.go

@@ -1,3 +1,3 @@
 package consts
 
-const ServerVersion = "1.2.4"
+const ServerVersion = "1.2.5"

+ 13 - 11
modules/modules.go

@@ -122,17 +122,19 @@ func (this *Modules) getCurrentModule(wrap *wrapper.Wrapper, backend bool) (*Mod
 	}
 
 	// Selected module
-	if len(wrap.UrlArgs) <= 0 {
-		if (*wrap.Config).Engine.MainModule > 0 {
-			if (*wrap.Config).Engine.MainModule == 1 {
-				if m, ok := this.mods["blog"]; ok {
-					mod = m
-					modCurr = "blog"
-				}
-			} else if (*wrap.Config).Engine.MainModule == 2 {
-				if m, ok := this.mods["shop"]; ok {
-					mod = m
-					modCurr = "shop"
+	if !backend {
+		if len(wrap.UrlArgs) <= 0 {
+			if (*wrap.Config).Engine.MainModule > 0 {
+				if (*wrap.Config).Engine.MainModule == 1 {
+					if m, ok := this.mods["blog"]; ok {
+						mod = m
+						modCurr = "blog"
+					}
+				} else if (*wrap.Config).Engine.MainModule == 2 {
+					if m, ok := this.mods["shop"]; ok {
+						mod = m
+						modCurr = "shop"
+					}
 				}
 			}
 		}