animeic 1 жил өмнө
parent
commit
c3c2f93f1d

+ 0 - 4
baishuihu/api/init.go

@@ -3,7 +3,6 @@ package api
 import (
 	"baishuihu/conf"
 	"baishuihu/db"
-	"net/http"
 
 	"github.com/gin-contrib/cors"
 	"github.com/gin-contrib/sessions"
@@ -20,9 +19,6 @@ func NewHttpService(app *conf.AppConf, dbMongo *db.MongoDB, redisClient *redis.C
 	store := cookie.NewStore([]byte("adhuaxi-server"))
 	engine.Use(sessions.Sessions("dcsession", store))
 	// engine.Static("/public", "static")
-
-	engine.StaticFS("/asset/images", http.Dir("images"))
-	// engine.StaticFS("/public/files", http.Dir("files"))
 	config := cors.DefaultConfig()
 	// config.AllowOrigins == []string{"http://google.com", "http://facebook.com"}
 	config.AllowAllOrigins = true

+ 1 - 1
baishuihu/api/upload.go

@@ -9,7 +9,7 @@ import (
 )
 
 func Upload(r *GinRouter) {
-	r.POST("upload/policy", UploadPolicy)
+	r.GETJWT("upload/policy", UploadPolicy)
 }
 
 const (

+ 5 - 7
baishuihu/app.yaml

@@ -1,5 +1,5 @@
 port: 8101
-name: adhuaxi
+name: baishuihu
 version: 1.0.0
 saveType: obs
 isRelease: true
@@ -22,15 +22,13 @@ nats:
   reconnDelaySecond: 5
 
 log:
-  fileName: adhuaxi.log
+  fileName: baishuihu.log
   level: 1
-  serviceName: adhuaxi
+  serviceName: baishuihu
 
 configer:
-  mongo: adxihua-mongo
-  redis: adxihua-redis
-
-publicBaseUrl: http://127.0.0.1:18091/public
+  mongo: baishuihu-mongo
+  redis: baishuihu-redis
 
 # 主账号
 # obs:

+ 0 - 8
baishuihu/conf/app.go

@@ -17,7 +17,6 @@ type AppConf struct {
 	SaveType         string //obs, oss, minio
 	IsRelease        bool
 	IsIgnoreUserType bool
-	PublicBaseUrl    string
 
 	Jwt struct {
 		Realm       string
@@ -142,13 +141,6 @@ func NewAppConf(filePath string) (*AppConf, error) {
 	}
 	fmt.Println("IsRelease =>", c.IsRelease)
 
-	// 上传图片baseurl
-	publicBaseUrl := os.Getenv("PUBLIC_BASE_URL")
-	if len(publicBaseUrl) > 0 {
-		c.PublicBaseUrl = publicBaseUrl
-	}
-	fmt.Println("PublicBaseUrl =>", c.PublicBaseUrl)
-
 	AppConfig = c
 
 	return c, nil