fix and update config

This commit is contained in:
deepzz0
2017-07-09 01:18:07 +08:00
parent a932d2906d
commit b9470fa14c
5 changed files with 3 additions and 4 deletions

View File

@@ -4,6 +4,7 @@ vendor
setting
docs
static/*.*
!static/favicon.ico
**/.DS_Store
Dockerfile
glide.yaml

View File

@@ -7,4 +7,4 @@ ADD static/tzdata/Shanghai /etc/localtime
COPY . /eiblog
EXPOSE 9000
WORKDIR /eiblog
ENTRYPOINT ["./eiblog"]
CMD ["./eiblog"]

View File

@@ -60,7 +60,7 @@ server {
}
# webmaster 站点验证相关
location ~* (robots\.txt|favicon\.ico|crossdomain\.xml|google4c90d18e696bdcf8\.html|BingSiteAuth\.xml)$ {
location ~* (google4c90d18e696bdcf8\.html|BingSiteAuth\.xml)$ {
root /data/eiblog/static;
expires 1d;
}

View File

@@ -27,7 +27,6 @@ services:
volumes:
- /data/eiblog/logdata:/eiblog/logdata
- /data/eiblog/conf:/eiblog/conf
- /data/eiblog/static:/eiblog/static
links:
- elasticsearch
- mongodb

View File

@@ -48,7 +48,6 @@ func BlackFilter(c *gin.Context) bool {
// 重定向
func Redirect(c *gin.Context) bool {
fmt.Println("scheme=======", c.Request.URL.Scheme)
if setting.Conf.Mode.EnableHttps && c.Request.ProtoMajor == 1 {
var port string
if strings.Contains(c.Request.Host, ":") {