mirror of
https://github.com/eiblog/eiblog.git
synced 2026-02-04 13:52:26 +08:00
fix and update config
This commit is contained in:
@@ -4,6 +4,7 @@ vendor
|
|||||||
setting
|
setting
|
||||||
docs
|
docs
|
||||||
static/*.*
|
static/*.*
|
||||||
|
!static/favicon.ico
|
||||||
**/.DS_Store
|
**/.DS_Store
|
||||||
Dockerfile
|
Dockerfile
|
||||||
glide.yaml
|
glide.yaml
|
||||||
|
|||||||
@@ -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"]
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
1
front.go
1
front.go
@@ -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, ":") {
|
||||||
|
|||||||
Reference in New Issue
Block a user