File tree Expand file tree Collapse file tree 3 files changed +22
-8
lines changed Expand file tree Collapse file tree 3 files changed +22
-8
lines changed Original file line number Diff line number Diff line change @@ -304,13 +304,13 @@ func (a *Application) createNewConfigFile() {
304
304
}
305
305
306
306
func (a * Application ) checkForApplicationUpdates () {
307
- if a .Gatekeeper .CanAccessUrl (updater .GetUpdateCheckUrlFormat ()) {
308
- updateAvailable := updater .IsLatestApplicationReleaseNewerThanCurrent (version .APP_VERSION , "permafrost-dev/stackup" )
307
+ // if a.Gatekeeper.CanAccessUrl(updater.GetUpdateCheckUrlFormat()) {
308
+ updateAvailable := updater .IsLatestApplicationReleaseNewerThanCurrent (version .APP_VERSION , "permafrost-dev/stackup" )
309
309
310
- if updateAvailable {
311
- support .WarningMessage ("A new version of StackUp is available. Please update to the latest version." )
312
- }
310
+ if updateAvailable {
311
+ support .WarningMessage ("A new version of StackUp is available. Please update to the latest version." )
313
312
}
313
+ // }
314
314
}
315
315
316
316
func (a * Application ) handleFlagOptions () {
Original file line number Diff line number Diff line change @@ -20,6 +20,14 @@ func (g *Gatekeeper) Initialize() {
20
20
}
21
21
22
22
func (g * Gatekeeper ) CanAccessUrl (urlStr string ) bool {
23
+ if ! g .Enabled {
24
+ return true
25
+ }
26
+
27
+ if App .Workflow .Settings .Domains .Allowed == nil {
28
+ return true
29
+ }
30
+
23
31
for _ , domain := range App .Workflow .Settings .Domains .Allowed {
24
32
parsedUrl , _ := url .Parse (urlStr )
25
33
Original file line number Diff line number Diff line change @@ -421,10 +421,16 @@ func (workflow *StackupWorkflow) Initialize() {
421
421
// ensure that the allowed domains are in the correct format, i.e. without a protocol or port
422
422
tempDomains := []string {}
423
423
for _ , domain := range workflow .Settings .Domains .Allowed {
424
- parsedUrl , _ := url .Parse (domain )
425
- tempDomains = append (tempDomains , parsedUrl .Host )
424
+ if strings .Contains (domain , "://" ) {
425
+ parsedUrl , _ := url .Parse (domain )
426
+ tempDomains = append (tempDomains , parsedUrl .Host )
427
+ } else {
428
+ tempDomains = append (tempDomains , domain )
429
+ }
426
430
}
427
- workflow .Settings .Domains .Allowed = tempDomains
431
+
432
+ copy (workflow .Settings .Domains .Allowed , tempDomains )
433
+ // workflow.Settings.Domains.Allowed = tempDomains
428
434
429
435
// initialize the includes
430
436
for _ , inc := range workflow .Includes {
You can’t perform that action at this time.
0 commit comments