Ensure we are on plugin or admin URLs

This commit is contained in:
Aurelsicoko 2017-10-02 14:26:57 +02:00
parent 69e4313abe
commit 51af99b31a

View File

@ -6,7 +6,7 @@ const { parallel } = require('async');
const { after, includes, indexOf, drop, dropRight, uniq, defaultsDeep, get, set, isEmpty, isUndefined, union } = require('lodash'); const { after, includes, indexOf, drop, dropRight, uniq, defaultsDeep, get, set, isEmpty, isUndefined, union } = require('lodash');
module.exports = function() { module.exports = function() {
const accepted = Object.keys(this.plugins).map(url => `^\/${url}`).concat(['^\/admin']); const accepted = Object.keys(this.plugins).map(url => `^\/${url}/`).concat(['^\/admin/']);
// Set if is admin destination for middleware application. // Set if is admin destination for middleware application.
// TODO: Use dynamic config for admin url. // TODO: Use dynamic config for admin url.