File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -36,15 +36,15 @@ function TimegateController(options) {
36
36
this . _routers = options . routers || [ ] ;
37
37
38
38
// Set up path matching
39
- this . _timegatePath = timegates . baseUrl || '/timegate/' ,
40
- this . _matcher = new RegExp ( '^' + Util . toRegExp ( this . _timegatePath ) + '(( .+?)\\?|(.+)) ' ) ;
39
+ this . _timegatePath = timegates . baseUrl || '/timegate/' ,
40
+ this . _matcher = new RegExp ( '^' + Util . toRegExp ( this . _timegatePath ) + '(.+?)\/?$ ' ) ;
41
41
}
42
42
Controller . extend ( TimegateController ) ;
43
43
44
44
// Tries to serve the requested Timegate
45
45
TimegateController . prototype . _handleRequest = function ( request , response , next ) {
46
46
var self = this , timegateMatch = this . _matcher && this . _matcher . exec ( request . url ) ,
47
- datasource = timegateMatch && ( timegateMatch [ 2 ] || timegateMatch [ 1 ] ) ;
47
+ datasource = timegateMatch && timegateMatch [ 1 ] ;
48
48
if ( datasource && this . _timemaps [ datasource ] ) {
49
49
// retrieve Accept-Datetime & construct memento link
50
50
var acceptDatetime = toDate ( request . headers [ 'accept-datetime' ] ) , // If no datetime is present, return most recent one
You can’t perform that action at this time.
0 commit comments