'use strict'

const IpLocator = require('./ip-locator')

async function register (server, options) {
  server.decorate('request', 'location', undefined)

  const locator = new IpLocator(options)

  server.ext('onPreAuth', async (request, h) => {
    return locator.handle(request, h)
  })
}

exports.plugin = {
  register,
  once: true,
  pkg: require('../package.json')
}

@@ -137,19 +137,8 @@
 ion'
-, undefined
 )%0A%0A 

remove undefined