Skip to content

Commit 257609d

Browse files
perf: Assistant domain check
1 parent f689cbc commit 257609d

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

frontend/src/i18n/en.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,8 @@
472472
"duplicate_email": "Duplicate email",
473473
"interface_credentials": "Interface credentials",
474474
"no_credentials_yet": "No credentials yet",
475-
"intelligent_customer_service": "SQLBot Intelligent Customer Service"
475+
"intelligent_customer_service": "SQLBot Intelligent Customer Service",
476+
"origin_format_error": "Format invalid, starts with http or https and cannot end with /"
476477
},
477478
"chat": {
478479
"type": "Chart Type",
@@ -518,4 +519,4 @@
518519
"back_community": "Restore to Community Edition",
519520
"confirm_tips": "Are you sure to restore to Community Edition?"
520521
}
521-
}
522+
}

frontend/src/i18n/zh-CN.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,8 @@
487487
"stop_replying": "停止回答",
488488
"i_am_sqlbot": "你好,我是 SQLBot",
489489
"predict_data_etc": "我可以查询数据、生成图表、检测数据异常、预测数据等",
490-
"intelligent_data_query": "赶快开启智能问数吧~"
490+
"intelligent_data_query": "赶快开启智能问数吧~",
491+
"origin_format_error": "格式错误,http或https开头,不能以 / 结尾"
491492
},
492493
"chat": {
493494
"type": "图表类型",
@@ -533,4 +534,4 @@
533534
"back_community": "还原至社区版",
534535
"confirm_tips": "确定还原至社区版?"
535536
}
536-
}
537+
}

frontend/src/views/system/embedded/index.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,11 @@ const rules = {
245245
t('datasource.please_enter') + t('common.empty') + t('embedded.cross_domain_settings'),
246246
trigger: 'blur',
247247
},
248+
{
249+
pattern: /^(https?:\/\/)?([\w-]+\.)*[\w-]+(:\d+)?$/,
250+
message: t('embedded.origin_format_error'),
251+
trigger: 'blur',
252+
},
248253
],
249254
}
250255

0 commit comments

Comments
 (0)