mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
stop riding the short bus, no clue why this stuff is here. only adds confusion, removing (#1)
server exposes Router field
This commit is contained in:
committed by
Travis Reeder
parent
85f7a53cc0
commit
53cbe2d5a4
@@ -4,6 +4,7 @@ import (
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net"
|
||||
@@ -50,7 +51,6 @@ type Server struct {
|
||||
|
||||
apiURL string
|
||||
|
||||
specialHandlers []SpecialHandler
|
||||
appListeners []AppListener
|
||||
middlewares []Middleware
|
||||
runnerListeners []RunnerListener
|
||||
@@ -385,8 +385,10 @@ func (s *Server) bindHandlers(ctx context.Context) {
|
||||
engine.Any("/r/:app", s.handleRunnerRequest)
|
||||
engine.Any("/r/:app/*route", s.handleRunnerRequest)
|
||||
|
||||
// This final route is used for extensions, see Server.Add
|
||||
engine.NoRoute(s.handleSpecial)
|
||||
engine.NoRoute(func(c *gin.Context) {
|
||||
logrus.Debugln("not found", c.Request.URL.Path)
|
||||
c.JSON(http.StatusNotFound, simpleError(errors.New("Path not found")))
|
||||
})
|
||||
}
|
||||
|
||||
type appResponse struct {
|
||||
|
||||
Reference in New Issue
Block a user