code: func (e *Environment) Base() router.MiddlewareChain {
  	// addServices is a middleware that installs the set of standard production
  	// AppEngine services by calling With.
  	addServices := func(c *router.Context, next router.Handler) {
  		// Create a cancelable Context that cancels when this request finishes.
  		//
  		// We do this because Contexts will leak resources and/or goroutines if they
  		// have timers or can be canceled, but aren't. Predictably canceling the
  		// parent will ensure that any such resource leaks are cleaned up.
  		var cancelFunc context.CancelFunc
  		c.Context, cancelFunc = context.WithCancel(c.Context)
  		defer cancelFunc()
  
  		// Apply production settings.
  		c.Context = e.With(c.Context, c.Request)
  
  		next(c)
  	}
  
  	mw := router.NewMiddlewareChain(addServices)
  	mw = mw.ExtendFrom(e.ExtraMiddleware)
  	return mw
  }
docs: // Base returns a middleware chain to use for all GAE environment
  // requests.
  //
  // Base DOES NOT install "luci/gae" services. To install appropriate services,
  // use methods from a sub-package. This is done so that a given AppEngine
  // environment doesn't need to include the superset of packages across all
  // supported environments.
  //
  // This middleware chain installs prod GAE services into the request context
  // (via With), and wraps the request with a panic catcher and monitoring
  // hooks.