This commit is contained in:
cdle
2023-06-07 17:33:29 +08:00
parent 90f302a682
commit c74c9b130e
7 changed files with 124 additions and 6 deletions
+4 -1
View File
@@ -49,6 +49,7 @@ func init() {
Server.Use(Cors())
Server.Use(gzip.Gzip(gzip.DefaultCompression))
Server.GET("/api/file/:filename", FindFile)
Server.GET("/api/decode/:random", Base642Binary)
Server.NoRoute(func(c *gin.Context) {
if c.Request.URL.Path != "/api/web_chat" {
logs.Debug(c.Request.URL.Path)
@@ -317,7 +318,9 @@ func init() {
// logs.Info("Http服务(%s)开始运行", port)
logs.Info("管理员面板:")
logs.Info(" > 本机: http://localhost:%s", port)
logs.Info(" > 局域网: http://%s:%s", getLocalIP(), port)
local_ip := getLocalIP()
sillyGirl.Set("local_ip", local_ip)
logs.Info(" > 局域网: http://%s:%s", local_ip, port)
if err := srvs[0].ListenAndServe(); err != nil && err != http.ErrServerClosed {
logs.Error("Http服务运行失败:%s", err.Error())
}