mirror of
https://github.com/caddyserver/caddy.git
synced 2025-07-09 03:04:57 -04:00
Updated Writing a Plugin: HTTP Middleware (markdown)
parent
92360268bb
commit
915b9436f4
@ -12,12 +12,12 @@ In this tutorial, you will learn:
|
||||
|
||||
## How HTTP Middleware Works in Caddy
|
||||
|
||||
Check out the [godoc for the httpserver package](http://godoc.org/github.com/mholt/caddy/caddyhttp/httpserver) The two most important types are [httpserver.Handler](https://godoc.org/github.com/mholt/caddy/caddyhttp/httpserver#Handler) and [httpserver.Middleware](https://godoc.org/github.com/mholt/caddy/caddyhttp/httpserver#Middleware).
|
||||
|
||||
Middleware is a way to chain one handler to another.
|
||||
Check out the [godoc for the httpserver package](http://godoc.org/github.com/mholt/caddy/caddyhttp/httpserver). The two most important types are [httpserver.Handler](https://godoc.org/github.com/mholt/caddy/caddyhttp/httpserver#Handler) and [httpserver.Middleware](https://godoc.org/github.com/mholt/caddy/caddyhttp/httpserver#Middleware).
|
||||
|
||||
Handler is a function that actually handles an HTTP request.
|
||||
|
||||
Middleware is a way to chain one handler to another.
|
||||
|
||||
Caddy will do all the bookkeeping of setting up an HTTP server for you, but you need to implement these two types.
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user