Skip to content

stevenmcdonald/hapi-trailing-slash

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Hapi plugin to redirect to non-trailing slash urls

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%