Skip to content

Commit e19e81b

Browse files
authored
Add multi region support (#11)
* Update all to version 1.24 * Update all to version 1.24 * Add support for AU, IN, CA, and AE regions
1 parent 27a850a commit e19e81b

4 files changed

Lines changed: 31 additions & 3 deletions

File tree

cmd/discard.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,16 @@ var discardCmd = &cobra.Command{
5858
URL = EUCIURL
5959
case "us":
6060
URL = USCIURL
61+
case "au":
62+
URL = AUCIURL
63+
case "in":
64+
URL = INCIURL
65+
case "ca":
66+
URL = CACIURL
67+
case "ae":
68+
URL = AECIURL
6169
default:
62-
fmt.Printf("Invalid region %s, expected eu or us\n", region)
70+
fmt.Printf("Invalid region %s, expected eu, us, au, in, ca or ae\n", region)
6371
os.Exit(1)
6472
}
6573

cmd/enforce.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,16 @@ var enforceCmd = &cobra.Command{
6262
URL = EUCIURL
6363
case "us":
6464
URL = USCIURL
65+
case "au":
66+
URL = AUCIURL
67+
case "in":
68+
URL = INCIURL
69+
case "ca":
70+
URL = CACIURL
71+
case "ae":
72+
URL = AECIURL
6573
default:
66-
fmt.Printf("Invalid region %s, expected eu or us\n", region)
74+
fmt.Printf("Invalid region %s, expected eu, us, au, in, ca or ae\n", region)
6775
os.Exit(1)
6876
}
6977

cmd/publish.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,16 @@ var publishCmd = &cobra.Command{
6767
URL = EUCIURL
6868
case "us":
6969
URL = USCIURL
70+
case "au":
71+
URL = AUCIURL
72+
case "in":
73+
URL = INCIURL
74+
case "ca":
75+
URL = CACIURL
76+
case "ae":
77+
URL = AECIURL
7078
default:
71-
fmt.Printf("Invalid region %s, expected eu or us\n", region)
79+
fmt.Printf("Invalid region %s, expected eu, us, au, in, ca or ae\n", region)
7280
os.Exit(1)
7381
}
7482

cmd/root.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ import (
1111
const (
1212
EUCIURL = "https://cloudinfra-gw.portal.checkpoint.com"
1313
USCIURL = "https://cloudinfra-gw-us.portal.checkpoint.com"
14+
AUCIURL = "https://cloudinfra-gw.ap.portal.checkpoint.com"
15+
INCIURL = "https://cloudinfra-gw.in.portal.checkpoint.com"
16+
AECIURL = "https://cloudinfra-gw.ae.portal.checkpoint.com"
17+
CACIURL = "https://cloudinfra-gw.ca.portal.checkpoint.com"
1418
CIAuthPath = "/auth/external"
1519
appIDClaim = "appId"
1620
wafAppID = "64488de9-f813-42a7-93e7-f3fe25dd9011"

0 commit comments

Comments
 (0)