|
@@ -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
|