Skip to content

Commit 697f8cd

Browse files
committed
v1.5.1 Merge branch 'dev'
2 parents 8fcf352 + 1c8387b commit 697f8cd

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

backend/application.go

+6-2
Original file line numberDiff line numberDiff line change
@@ -360,23 +360,27 @@ func UpdateApplication(body []byte, clientIP string, authUser *models.AuthUser)
360360
return nil, err
361361
}
362362
app := rpcAppRequest.Object
363+
// backup app0 to update destinations and domains
364+
var app0 *models.Application
363365
customHeaders := GetCustomHeadersString(app.CustomHeaders)
364366
if app.ID == 0 {
365367
// new application
366368
app.ID = data.DAL.InsertApplication(app.Name, app.InternalScheme, app.RedirectHTTPS, app.HSTSEnabled, app.WAFEnabled, app.ShieldEnabled, app.ClientIPMethod, app.Description, app.OAuthRequired, app.SessionSeconds, app.Owner, app.CSPEnabled, app.CSP, app.CacheEnabled, customHeaders)
367369
Apps = append(Apps, app)
370+
app0 = app
368371
go utils.OperationLog(clientIP, authUser.Username, "Add Application", app.Name)
369372
} else {
370373
err := data.DAL.UpdateApplication(app.Name, app.InternalScheme, app.RedirectHTTPS, app.HSTSEnabled, app.WAFEnabled, app.ShieldEnabled, app.ClientIPMethod, app.Description, app.OAuthRequired, app.SessionSeconds, app.Owner, app.CSPEnabled, app.CSP, app.CacheEnabled, customHeaders, app.ID)
371374
if err != nil {
372375
utils.DebugPrintln("UpdateApplication", err)
373376
}
377+
app0, _ = GetApplicationByID(app.ID)
374378
// update app pointer in apps
375379
UpdateApplications(app)
376380
go utils.OperationLog(clientIP, authUser.Username, "Update Application", app.Name)
377381
}
378-
UpdateDestinations(app, app.Destinations)
379-
UpdateAppDomains(app, app.Domains)
382+
UpdateDestinations(app0, app.Destinations)
383+
UpdateAppDomains(app0, app.Domains)
380384
data.UpdateBackendLastModified()
381385
return app, nil
382386
}

data/data.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ var (
3535
// IsPrimary i.e. Is Primary Node
3636
IsPrimary bool
3737
// Version of JANUSEC
38-
Version = "1.5.0"
38+
Version = "1.5.1"
3939
)
4040

4141
// InitConfig init Data Access Layer

gateway/gateway.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -386,10 +386,10 @@ func ReverseHandlerFunc(w http.ResponseWriter, r *http.Request) {
386386

387387
// var transport http.RoundTripper
388388
transport := &http.Transport{
389-
TLSHandshakeTimeout: 30 * time.Second,
390-
ResponseHeaderTimeout: 30 * time.Second,
391-
IdleConnTimeout: 30 * time.Second,
392-
ExpectContinueTimeout: 10 * time.Second,
389+
TLSHandshakeTimeout: 60 * time.Second,
390+
ResponseHeaderTimeout: 60 * time.Second,
391+
IdleConnTimeout: 60 * time.Second,
392+
ExpectContinueTimeout: 30 * time.Second,
393393
MaxIdleConns: 100,
394394
DialContext: func(ctx context.Context, network, addr string) (net.Conn, error) {
395395
dest.Mutex.Lock()

release_batch.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ printf "Creating installation package\n"
22
printf "Checklist:\n"
33
printf "* Angular Admin Version Check. \n"
44
printf "* Janusec Version Check. \n"
5-
version="1.5.0"
5+
version="1.5.1"
66
printf "Version: ${version} \n"
77

88
read -r -p "Are You Sure? [Y/n] " option

0 commit comments

Comments
 (0)