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 setting
docs docs
static/*.* static/*.*
!static/favicon.ico
**/.DS_Store **/.DS_Store
Dockerfile Dockerfile
glide.yaml glide.yaml

View File

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

View File

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

View File

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

View File

@@ -48,7 +48,6 @@ func BlackFilter(c *gin.Context) bool {
// 重定向 // 重定向
func Redirect(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 { if setting.Conf.Mode.EnableHttps && c.Request.ProtoMajor == 1 {
var port string var port string
if strings.Contains(c.Request.Host, ":") { if strings.Contains(c.Request.Host, ":") {