mirror of https://github.com/allinssl/allinssl
parent
58e4c0ff11
commit
20b0e0c4bd
|
@ -245,7 +245,12 @@ func RunNode(node *WorkflowNode, ctx *ExecutionContext) error {
|
|||
var wg sync.WaitGroup
|
||||
errChan := make(chan error, len(node.ConditionNodes))
|
||||
for _, branch := range node.ConditionNodes {
|
||||
if branch.ChildNode != nil {
|
||||
if branch.ChildNode.ChildNode == nil {
|
||||
branch.ChildNode.Config = make(map[string]any)
|
||||
}
|
||||
branch.ChildNode.Config["fromNodeData"] = node.Config["fromNodeData"]
|
||||
}
|
||||
wg.Add(1)
|
||||
go func(node *WorkflowNode) {
|
||||
defer wg.Done()
|
||||
|
@ -271,6 +276,9 @@ func RunNode(node *WorkflowNode, ctx *ExecutionContext) error {
|
|||
for _, branch := range node.ConditionNodes {
|
||||
if branch.Config["type"] == string(lastStatus) {
|
||||
if branch.ChildNode != nil {
|
||||
if branch.ChildNode.Config == nil {
|
||||
branch.ChildNode.Config = make(map[string]any)
|
||||
}
|
||||
fromNodeData, ok := ctx.GetOutput(node.Config["fromNodeId"].(string))
|
||||
if !ok {
|
||||
fromNodeData = nil
|
||||
|
|
|
@ -33,6 +33,11 @@ func SessionAuthMiddleware() gin.HandlerFunc {
|
|||
session := sessions.Default(c)
|
||||
now := time.Now()
|
||||
gob.Register(time.Time{})
|
||||
if public.Secure == "" && session.Get("secure") == nil {
|
||||
session.Set("secure", true)
|
||||
session.Set("lastRequestTime", now)
|
||||
session.Save()
|
||||
}
|
||||
last := session.Get("lastRequestTime")
|
||||
|
||||
if routePath == public.Secure {
|
||||
|
|
|
@ -39,7 +39,11 @@ func main() {
|
|||
if public.GetSettingIgnoreError("https") == "1" {
|
||||
http = "https"
|
||||
}
|
||||
url := fmt.Sprintf("%s://127.0.0.1:%s%s", http, public.Port, public.Secure)
|
||||
secure := "/login"
|
||||
if public.Secure != "" {
|
||||
secure = public.Secure
|
||||
}
|
||||
url := fmt.Sprintf("%s://127.0.0.1:%s%s", http, public.Port, secure)
|
||||
err := exec.Command("rundll32", "url.dll,FileProtocolHandler", url).Start()
|
||||
if err != nil {
|
||||
fmt.Println("无法打开浏览器,请手动访问:", url)
|
||||
|
|
Loading…
Reference in New Issue