Skip to content

Commit 236586c

Browse files
committed
Remove aws.region validation
Signed-off-by: pincher95 <[email protected]>
1 parent b096536 commit 236586c

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func (c *Config) validate() error {
6868
return fmt.Errorf("auth_module %s type apikey requires apikey", name)
6969
}
7070
case "aws":
71-
if am.AWS == nil || am.AWS.Region == "" {
71+
if am.AWS == nil {
7272
return fmt.Errorf("auth_module %s type aws requires region", name)
7373
}
7474
case "tls":

main.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -350,10 +350,6 @@ func main() {
350350
}
351351
case "aws":
352352
if am.AWS != nil {
353-
if am.AWS.Region == "" {
354-
http.Error(w, "aws.region is required for aws auth_module", http.StatusBadRequest)
355-
return
356-
}
357353
var err error
358354
transport, err = roundtripper.NewAWSSigningTransport(transport, am.AWS.Region, am.AWS.RoleARN, logger)
359355
if err != nil {

0 commit comments

Comments
 (0)