fix: 解决网站的默认文档不能设置为子目录的文件的问题 (#1194)

Refs https://github.com/1Panel-dev/1Panel/issues/720
pull/1195/head
zhengkunwang223 2 years ago committed by GitHub
parent 34ac685e65
commit ca3b4b02e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -244,7 +244,7 @@ const checkDoc = (rule: any, value: any, callback: any) => {
if (value === '' || typeof value === 'undefined' || value == null) { if (value === '' || typeof value === 'undefined' || value == null) {
callback(new Error(i18n.global.t('commons.rule.nginxDoc'))); callback(new Error(i18n.global.t('commons.rule.nginxDoc')));
} else { } else {
const reg = /^[A-Za-z0-9\n.]+$/; const reg = /^[A-Za-z0-9\n./]+$/;
if (!reg.test(value) && value !== '') { if (!reg.test(value) && value !== '') {
callback(new Error(i18n.global.t('commons.rule.nginxDoc'))); callback(new Error(i18n.global.t('commons.rule.nginxDoc')));
} else { } else {

Loading…
Cancel
Save