code: func (p *Plugin) AfterInit() (err error) {
  	cfgCopy := *p.Config
  
  	var handler http.Handler = p.mx
  	if p.Authenticator != nil {
  		handler = auth(handler, p.Authenticator)
  	}
  
  	p.server, err = ListenAndServe(cfgCopy, handler)
  	if err != nil {
  		return err
  	}
  
  	if cfgCopy.UseHTTPS() {
  		p.Log.Info("Listening on https://", cfgCopy.Endpoint)
  	} else {
  		p.Log.Info("Listening on http://", cfgCopy.Endpoint)
  	}
  
  	return nil
  }
docs: // AfterInit starts the HTTP server.