blob: 25c51d8c8ef47f17d4669fa529fef2064d46d500 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
package http
import (
"io"
"net/http"
"github.com/gin-gonic/gin"
)
type Server struct{}
func NewServer() *Server {
return &Server{}
}
func (s *Server) Start(zapWriter io.Writer) {
router := gin.Default()
router.SetTrustedProxies(nil)
gin.DisableConsoleColor()
gin.DefaultWriter = zapWriter // send gin logs to zap
router.GET("/.well-known/webfinger", func(c *gin.Context) {
// resource := c.Query("resource")
c.JSON(http.StatusOK, nil)
})
router.Run()
}
|