Skip to content

Commit

Permalink
v1.5.1 Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
janusec2 committed Jul 13, 2024
2 parents 8fcf352 + 1c8387b commit 697f8cd
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
8 changes: 6 additions & 2 deletions backend/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,23 +360,27 @@ func UpdateApplication(body []byte, clientIP string, authUser *models.AuthUser)
return nil, err
}
app := rpcAppRequest.Object
// backup app0 to update destinations and domains
var app0 *models.Application
customHeaders := GetCustomHeadersString(app.CustomHeaders)
if app.ID == 0 {
// new application
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)
Apps = append(Apps, app)
app0 = app
go utils.OperationLog(clientIP, authUser.Username, "Add Application", app.Name)
} else {
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)
if err != nil {
utils.DebugPrintln("UpdateApplication", err)
}
app0, _ = GetApplicationByID(app.ID)
// update app pointer in apps
UpdateApplications(app)
go utils.OperationLog(clientIP, authUser.Username, "Update Application", app.Name)
}
UpdateDestinations(app, app.Destinations)
UpdateAppDomains(app, app.Domains)
UpdateDestinations(app0, app.Destinations)
UpdateAppDomains(app0, app.Domains)
data.UpdateBackendLastModified()
return app, nil
}
Expand Down
2 changes: 1 addition & 1 deletion data/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ var (
// IsPrimary i.e. Is Primary Node
IsPrimary bool
// Version of JANUSEC
Version = "1.5.0"
Version = "1.5.1"
)

// InitConfig init Data Access Layer
Expand Down
8 changes: 4 additions & 4 deletions gateway/gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -386,10 +386,10 @@ func ReverseHandlerFunc(w http.ResponseWriter, r *http.Request) {

// var transport http.RoundTripper
transport := &http.Transport{
TLSHandshakeTimeout: 30 * time.Second,
ResponseHeaderTimeout: 30 * time.Second,
IdleConnTimeout: 30 * time.Second,
ExpectContinueTimeout: 10 * time.Second,
TLSHandshakeTimeout: 60 * time.Second,
ResponseHeaderTimeout: 60 * time.Second,
IdleConnTimeout: 60 * time.Second,
ExpectContinueTimeout: 30 * time.Second,
MaxIdleConns: 100,
DialContext: func(ctx context.Context, network, addr string) (net.Conn, error) {
dest.Mutex.Lock()
Expand Down
2 changes: 1 addition & 1 deletion release_batch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ printf "Creating installation package\n"
printf "Checklist:\n"
printf "* Angular Admin Version Check. \n"
printf "* Janusec Version Check. \n"
version="1.5.0"
version="1.5.1"
printf "Version: ${version} \n"

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

0 comments on commit 697f8cd

Please sign in to comment.