mirror of
https://github.com/filebrowser/filebrowser.git
synced 2026-01-23 02:35:10 +00:00
Hello
This commit is contained in:
commit
b06a0e2b3d
2 changed files with 24 additions and 0 deletions
3
Caddyfile
Normal file
3
Caddyfile
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
0.0.0.0
|
||||
|
||||
hugo
|
||||
21
hugo.go
Normal file
21
hugo.go
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
package hugo
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/mholt/caddy/config/setup"
|
||||
"github.com/mholt/caddy/middleware"
|
||||
)
|
||||
|
||||
func Setup(c *setup.Controller) (middleware.Middleware, error) {
|
||||
return func(next middleware.Handler) middleware.Handler {
|
||||
return &handler{}
|
||||
}, nil
|
||||
}
|
||||
|
||||
type handler struct{}
|
||||
|
||||
func (h handler) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error) {
|
||||
w.Write([]byte("Hello, I'm a caddy middleware"))
|
||||
return 200, nil
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue