3.1.1 • Published 3 years ago

hapi-trailing-slash v3.1.1

Weekly downloads
47
License
MIT
Repository
github
Last release
3 years ago

hapi-trailing-slash # Build Status

Handles common trailing slash issues for incoming URLs

###register like so:###

var module = require("hapi-trailing-slash");
.
.
.
server.register({
  register: module,
  options: {
    method: 'remove',
    verbose: true
  }
});

###options are:###

  • 'append' -- detects incoming requests that have no trailing slash, adds one, and redirects to the new url
  • 'remove' -- detects incoming requests with a trailing slash, removes it, and redirects to the new url