We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fbba2be commit 0d45e38Copy full SHA for 0d45e38
main.go
@@ -2,13 +2,13 @@ package main
2
3
import (
4
"bufio"
5
- "github.com/gin-gonic/gin"
6
"os"
7
"strconv"
8
"time"
9
10
"github.com/ProtobufBot/Go-Mirai-Client/service/bot"
11
"github.com/ProtobufBot/Go-Mirai-Client/service/handler"
+ "github.com/gin-gonic/gin"
12
log "github.com/sirupsen/logrus"
13
)
14
@@ -56,7 +56,10 @@ func main() {
56
57
log.Infof("端口号 %s", port)
58
port = ":" + port
59
- router := gin.Default()
+ //router := gin.Default()
60
+ router := gin.New()
61
+ router.Use(gin.Recovery())
62
+
63
router.Use(handler.CORSMiddleware())
64
router.Static("/", "./static")
65
router.POST("/bot/create/v1", handler.CreateBot)
0 commit comments