diff --git a/caddyhole.go b/caddyhole.go index b4c3231..9a14527 100644 --- a/caddyhole.go +++ b/caddyhole.go @@ -48,7 +48,7 @@ func (CaddyHole) CaddyModule() caddy.ModuleInfo { } // Provision sets up the CaddyHole module. -func (c *CaddyHole) Provision(ctx caddy.Context) error { +func (c *CaddyHole) Provision(_ caddy.Context) error { // Set defaults if c.MinBotBytes == 0 { c.MinBotBytes = 1024 * 1024 // 1MB @@ -81,7 +81,7 @@ func (c *CaddyHole) Cleanup() error { func (c *CaddyHole) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error { // Check if the request is from a bot/crawler if c.isBot(r) { - c.feedBot(w, r) + c.feedBot(w) return nil } @@ -117,7 +117,7 @@ func (c *CaddyHole) isBot(r *http.Request) bool { } // feedBot sends random data from /dev/random to the bot. -func (c *CaddyHole) feedBot(w http.ResponseWriter, r *http.Request) { +func (c *CaddyHole) feedBot(w http.ResponseWriter) { // Calculate random amount of bytes to send bytesToSend := c.MinBotBytes if c.MaxBotBytes > c.MinBotBytes {