feat: 服务管理支持 HTTP/HTTPS 协议选择
- Service 增加 scheme 字段,build_url 按协议拼接地址 - 表单新增协议下拉;启动时自动迁移已有 SQLite 库 - 更新部署说明中的 HTTPS 服务添加示例 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -21,7 +21,16 @@ class GroupForm(FlaskForm):
|
||||
|
||||
class ServiceForm(FlaskForm):
|
||||
name = StringField("服务名称", validators=[DataRequired(message="请输入服务名称")])
|
||||
host = StringField("内网 IP 或主机名", validators=[DataRequired(message="请输入主机")])
|
||||
scheme = SelectField(
|
||||
"协议",
|
||||
choices=[("http", "HTTP"), ("https", "HTTPS")],
|
||||
default="http",
|
||||
validators=[DataRequired(message="请选择协议")],
|
||||
)
|
||||
host = StringField(
|
||||
"主机或域名",
|
||||
validators=[DataRequired(message="请输入主机或域名")],
|
||||
)
|
||||
port = IntegerField(
|
||||
"端口",
|
||||
validators=[
|
||||
|
||||
Reference in New Issue
Block a user