Skip to content

Commit

Permalink
Relax validation to allow http in URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
incorbador committed Jul 4, 2024
1 parent 682a481 commit 679a290
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/assert/assert.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ func ValidAPIEndpoint(value string) error {
return errors.WithStack(err)
}

if u.Scheme != "https" {
return errors.Errorf("assert failed: scheme needs to be 'https' in given value '%s' (scheme: '%s')", value, u.Scheme)
if u.Scheme != "https" && u.Scheme != "http" {
return errors.Errorf("assert failed: scheme needs to be 'https' or 'http' in given value '%s' (scheme: '%s')", value, u.Scheme)
}

if u.Host == "" {
Expand Down

0 comments on commit 679a290

Please sign in to comment.