Create .middlewares() method to build midlleware stack to perform request
This commit is contained in:
@@ -30,8 +30,11 @@ module.exports = class TileTemplateController {
|
||||
}
|
||||
|
||||
register (templateRouter) {
|
||||
templateRouter.get(
|
||||
`/:template_id/:layer/:z/:x/:y.(:format)`,
|
||||
templateRouter.get('/:template_id/:layer/:z/:x/:y.(:format)', this.middlewares());
|
||||
}
|
||||
|
||||
middlewares () {
|
||||
return [
|
||||
coordinates(),
|
||||
credentials(),
|
||||
authorize(this.authBackend),
|
||||
@@ -52,7 +55,7 @@ module.exports = class TileTemplateController {
|
||||
surrogateKeyHeader({ surrogateKeysCache: this.surrogateKeysCache }),
|
||||
lastModifiedHeader(),
|
||||
vectorError()
|
||||
);
|
||||
];
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user