move middleware to sql-router
This commit is contained in:
parent
598e7615a5
commit
0046480231
@ -19,7 +19,6 @@ const surrogateKey = require('../middlewares/surrogate-key');
|
||||
const lastModified = require('../middlewares/last-modified');
|
||||
const formatter = require('../middlewares/formatter');
|
||||
const content = require('../middlewares/content');
|
||||
const clientHeader = require('../middlewares/client-header');
|
||||
|
||||
const { RATE_LIMIT_ENDPOINTS_GROUPS } = rateLimits;
|
||||
const PSQL = require('cartodb-psql');
|
||||
@ -56,7 +55,6 @@ module.exports = class QueryController {
|
||||
lastModified(),
|
||||
formatter(),
|
||||
content(),
|
||||
clientHeader(),
|
||||
handleQuery({ stats: this.stats })
|
||||
];
|
||||
};
|
||||
|
@ -10,6 +10,7 @@ const logger = require('../middlewares/logger');
|
||||
const profiler = require('../middlewares/profiler');
|
||||
const cors = require('../middlewares/cors');
|
||||
const servedByHostHeader = require('../middlewares/served-by-host-header');
|
||||
const clientHeader = require('../middlewares/client-header');
|
||||
|
||||
const QueryController = require('./query-controller');
|
||||
const CopyController = require('./copy-controller');
|
||||
@ -61,6 +62,7 @@ module.exports = class SqlRouter {
|
||||
sqlRouter.use(logger());
|
||||
sqlRouter.use(profiler({ statsClient: this.statsClient }));
|
||||
sqlRouter.use(cors());
|
||||
sqlRouter.use(clientHeader());
|
||||
sqlRouter.use(servedByHostHeader());
|
||||
|
||||
this.queryController.route(sqlRouter);
|
||||
|
Loading…
Reference in New Issue
Block a user