|
@@ -161,6 +161,10 @@ func (db *Database) GetHomepages(sponsorID, clientRegion string, isMobilePlatfor
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ if sponsor == nil {
|
|
|
|
|
+ return sponsorHomePages
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
homePages := sponsor.HomePages
|
|
homePages := sponsor.HomePages
|
|
|
|
|
|
|
|
if isMobilePlatform {
|
|
if isMobilePlatform {
|
|
@@ -242,6 +246,10 @@ func (db *Database) GetHttpsRequestRegexes(sponsorID string) []map[string]string
|
|
|
sponsor, _ = db.Sponsors[db.DefaultSponsorID]
|
|
sponsor, _ = db.Sponsors[db.DefaultSponsorID]
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ if sponsor == nil {
|
|
|
|
|
+ return regexes
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// If neither sponsorID or DefaultSponsorID were found, sponsor will be the
|
|
// If neither sponsorID or DefaultSponsorID were found, sponsor will be the
|
|
|
// zero value of the map, an empty Sponsor struct.
|
|
// zero value of the map, an empty Sponsor struct.
|
|
|
for _, sponsorRegex := range sponsor.HttpsRequestRegexes {
|
|
for _, sponsorRegex := range sponsor.HttpsRequestRegexes {
|