Skip to content

Commit

Permalink
Merge pull request #25 from superfly/get-app-compact
Browse files Browse the repository at this point in the history
Use GetAppCompact instead of heavy GetApp call
  • Loading branch information
pborzenkov authored May 2, 2023
2 parents 5f333f4 + 8df425d commit a4467b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dockerproxy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ func authorizeRequestWithCache(appName, authToken string) bool {
func authorizeRequest(appName, authToken string) bool {
fly := api.NewClient(authToken, fmt.Sprintf("superfly/rchab/%s", gitSha), "0.0.0.0.0.0.1", log)

app, err := fly.GetApp(context.TODO(), appName)
app, err := fly.GetAppCompact(context.TODO(), appName)
if app == nil || err != nil {
log.Warnf("Error fetching app %s: %v", appName, err)
return false
Expand All @@ -447,7 +447,7 @@ func authorizeRequest(appName, authToken string) bool {
log.Warn("FLY_APP_NAME env var is not set!")
return false
}
builderApp, err := fly.GetApp(context.TODO(), builderAppName)
builderApp, err := fly.GetAppCompact(context.TODO(), builderAppName)
if builderApp == nil || err != nil {
log.Warnf("Error fetching builder app %s", builderAppName)
return false
Expand Down

0 comments on commit a4467b8

Please sign in to comment.