Please jshint
This commit is contained in:
parent
2e13bc42a1
commit
f8d1e159f4
@ -3,7 +3,6 @@ const cors = require('../middleware/cors');
|
|||||||
const user = require('../middleware/user');
|
const user = require('../middleware/user');
|
||||||
const locals = require('../middleware/locals');
|
const locals = require('../middleware/locals');
|
||||||
const credentials = require('../middleware/credentials');
|
const credentials = require('../middleware/credentials');
|
||||||
const userMiddleware = require('../middleware/user');
|
|
||||||
const rateLimit = require('../middleware/rate-limit');
|
const rateLimit = require('../middleware/rate-limit');
|
||||||
const { RATE_LIMIT_ENDPOINTS_GROUPS } = rateLimit;
|
const { RATE_LIMIT_ENDPOINTS_GROUPS } = rateLimit;
|
||||||
|
|
||||||
|
@ -456,17 +456,17 @@ function withLayergroup(layergroupConfig, options, callback) {
|
|||||||
|
|
||||||
const signerTpl = function ({ signer }) {
|
const signerTpl = function ({ signer }) {
|
||||||
return `${signer ? `:${signer}@` : ''}`;
|
return `${signer ? `:${signer}@` : ''}`;
|
||||||
}
|
};
|
||||||
|
|
||||||
const cacheTpl = function ({ cache_buster, cacheBuster }) {
|
const cacheTpl = function ({ cache_buster, cacheBuster }) {
|
||||||
return `${cache_buster ? `:${cache_buster}` : `:${cacheBuster}`}`;
|
return `${cache_buster ? `:${cache_buster}` : `:${cacheBuster}`}`;
|
||||||
}
|
};
|
||||||
|
|
||||||
const urlTpl = function ({layergroupid, cache_buster = null, tile }) {
|
const urlTpl = function ({layergroupid, cache_buster = null, tile }) {
|
||||||
const { signer, token , cacheBuster } = LayergroupToken.parse(layergroupid);
|
const { signer, token , cacheBuster } = LayergroupToken.parse(layergroupid);
|
||||||
const base = '/database/windshaft_test/layergroup/'
|
const base = '/database/windshaft_test/layergroup/';
|
||||||
return `${base}${signerTpl({signer})}${token}${cacheTpl({cache_buster, cacheBuster})}${tile}`;
|
return `${base}${signerTpl({signer})}${token}${cacheTpl({cache_buster, cacheBuster})}${tile}`;
|
||||||
}
|
};
|
||||||
|
|
||||||
const finalUrl = urlTpl({ layergroupid, cache_buster: options.cache_buster, tile: layergroupUrl });
|
const finalUrl = urlTpl({ layergroupid, cache_buster: options.cache_buster, tile: layergroupUrl });
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user