From 2d726a4f755ff5afd084153793dd4c8e4ea66987 Mon Sep 17 00:00:00 2001 From: Simo Kinnunen Date: Wed, 16 Jul 2014 11:38:14 +0900 Subject: [PATCH] Require trailing slash in auth URLs. --- lib/roles/auth/ldap.js | 4 ++-- lib/roles/auth/mock.js | 4 ++-- res/auth/ldap/scripts/routes.js | 4 ++-- res/auth/mock/scripts/routes.js | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/roles/auth/ldap.js b/lib/roles/auth/ldap.js index 8936ffff..3b4ec75c 100644 --- a/lib/roles/auth/ldap.js +++ b/lib/roles/auth/ldap.js @@ -64,10 +64,10 @@ module.exports = function(options) { }) app.get('/', function(req, res) { - res.redirect('/auth/ldap') + res.redirect('/auth/ldap/') }) - app.get('/auth/ldap', function(req, res) { + app.get('/auth/ldap/', function(req, res) { res.render('index') }) diff --git a/lib/roles/auth/mock.js b/lib/roles/auth/mock.js index 55cfbf61..0d817fd5 100644 --- a/lib/roles/auth/mock.js +++ b/lib/roles/auth/mock.js @@ -63,10 +63,10 @@ module.exports = function(options) { }) app.get('/', function(req, res) { - res.redirect('/auth/mock') + res.redirect('/auth/mock/') }) - app.get('/auth/mock', function(req, res) { + app.get('/auth/mock/', function(req, res) { res.render('index') }) diff --git a/res/auth/ldap/scripts/routes.js b/res/auth/ldap/scripts/routes.js index 0f76c53a..6d5f4760 100644 --- a/res/auth/ldap/scripts/routes.js +++ b/res/auth/ldap/scripts/routes.js @@ -5,12 +5,12 @@ define(['./app'], function(app) { , function($routeProvider, $locationProvider) { $locationProvider.html5Mode(true) $routeProvider - .when('/auth/ldap', { + .when('/auth/ldap/', { templateUrl: '/static/auth/ldap/views/signin.html' , controller: 'SignInCtrl' }) .otherwise({ - redirectTo: '/auth/ldap' + redirectTo: '/auth/ldap/' }) } ]) diff --git a/res/auth/mock/scripts/routes.js b/res/auth/mock/scripts/routes.js index 4d662281..399ddfe6 100644 --- a/res/auth/mock/scripts/routes.js +++ b/res/auth/mock/scripts/routes.js @@ -5,12 +5,12 @@ define(['./app'], function(app) { , function($routeProvider, $locationProvider) { $locationProvider.html5Mode(true) $routeProvider - .when('/auth/mock', { + .when('/auth/mock/', { templateUrl: '/static/auth/mock/views/partials/signin.html' , controller: 'SignInCtrl' }) .otherwise({ - redirectTo: '/auth/mock' + redirectTo: '/auth/mock/' }) } ])