(*)no website switch in env variable

This commit is contained in:
Fan Yang 2015-12-27 18:53:43 +08:00
parent 32026b9c5c
commit cf627762cb
1 changed files with 5 additions and 0 deletions

View File

@ -5,6 +5,7 @@ import (
"fmt"
"github.com/astaxie/beego"
"net"
"os"
"strings"
)
@ -270,6 +271,10 @@ func (this *MainController) GetAllJSON() {
}
func (this *MainController) Get() {
if noweb := os.Getenv("NOWEB"); noweb == "1" {
this.Abort(404)
return
}
this.Data["Email"] = "missdeer@dfordsoft.com"
this.Data["UserAgent"] = this.Ctx.Request.UserAgent()
ip := this.Ctx.Input.IP()