[ftr/config] Fixed app url schema (#16748) (#16750)

This commit is contained in:
liza-mae 2018-02-15 10:45:09 -07:00 committed by GitHub
parent a05fe98c7a
commit b260359852
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,6 +21,11 @@ const urlPartsSchema = () => Joi.object().keys({
hash: Joi.string().regex(/^\//, 'start with a /')
}).default();
const appUrlPartsSchema = () => Joi.object().keys({
pathname: Joi.string().regex(/^\//, 'start with a /'),
hash: Joi.string().regex(/^\//, 'start with a /')
}).default();
const defaultRelativeToConfigPath = path => {
const makeDefault = (locals, options) => (
resolve(dirname(options.context.path), path)
@ -92,7 +97,7 @@ export const schema = Joi.object().keys({
// definition of apps that work with `common.navigateToApp()`
apps: Joi.object().pattern(
ID_PATTERN,
urlPartsSchema()
appUrlPartsSchema()
).default(),
// settings for the esArchiver module