CartoDB-SQL-API/app/controllers/generic_controller.js
2015-12-03 18:43:13 +01:00

18 lines
360 B
JavaScript

'use strict';
var setCrossDomain = require('../utils/cross_domain');
function GenericController() {
}
GenericController.prototype.route = function (app) {
app.options('*', this.handleRequest.bind(this));
};
GenericController.prototype.handleRequest = function(req, res) {
setCrossDomain(res);
res.end();
};
module.exports = GenericController;