Properly add CORS to vector style endpoints
This commit is contained in:
parent
575c1df524
commit
fc32cc24e5
1 changed files with 2 additions and 2 deletions
|
@ -63,6 +63,8 @@ module.exports = function(opts, callback) {
|
|||
|
||||
var data = clone(config.data || {});
|
||||
|
||||
app.use(cors());
|
||||
|
||||
Object.keys(config.styles || {}).forEach(function(id) {
|
||||
var item = config.styles[id];
|
||||
if (!item.style || item.style.length == 0) {
|
||||
|
@ -104,8 +106,6 @@ module.exports = function(opts, callback) {
|
|||
app.use('/fonts/', serve_font(options, serving.fonts));
|
||||
}
|
||||
|
||||
app.use(cors());
|
||||
|
||||
Object.keys(data).forEach(function(id) {
|
||||
var item = data[id];
|
||||
if (!item.mbtiles || item.mbtiles.length == 0) {
|
||||
|
|
Loading…
Reference in a new issue