code: function akaya (server, pluginOptions) {
    server.decorate('server', 'aka', serverDecorator.bind(this, server))
    server.decorate('request', 'aka', function (id, params = {}, options = {}) {
      options = joi.attempt(options, internals.scheme.options)
  
      const path = server.aka(id, params)
      let protocol
  
      if (options.rel) {
        return path
      }
  
      switch (options.secure) {
        case true:
          protocol = 'https'
          break
        case false:
          protocol = 'http'
          break
        default:
          protocol = this.headers['x-forwarded-proto'] || server.info.protocol
      }
  
      return `${protocol}://${options.host || this.info.host}${path}`
    })
  }
docs: @function
  @public
  
  Plugin to generate URIs based on ID and parameters
  
  @param {Object} server The server to be extended
  @param {Object} pluginOptions The plugin options