func (m Middleware) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error
I want to read and send a static file to the client side, based on the’root 'configuration. What should be done. For example:x.readAndSend (x.get ("root ") . "/ static.html")
I’m learning to develop a request flow limiting extension module for caddy.
The configuration file for the design is mymodule { req_per_second int, respond xx.html }
I want to return xx.html as response output when the request reaches req_per_seond.
But I want to read the file based on the root path of the current server’s configuration, and I don’t know how I can read the root configuration, or how to determine multiple root configurations