setPrefix(prefix) {
    if (this.path) {
      this.path =
        this.path !== '/' || this.opts.strict === true
          ? `${prefix}${this.path}`
          : prefix;
      this.paramNames = [];
      this.regexp = pathToRegexp(this.path, this.paramNames, this.opts);
    }

    return this;
  }
Prefix route path.

@param {String} prefix
@returns {Layer}
@private