Skip to content

Commit

Permalink
OTT-421: Added warning when events.enabled=true (#257)
Browse files Browse the repository at this point in the history
* OTT-421: Added warning when events.enabled is true

Co-authored-by: Shriprasad <shriprasad.marathe@pubmatic.com>
  • Loading branch information
ShriprasadM and pm-shriprasad-marathe committed Feb 17, 2022
1 parent 2ba4def commit 7766601
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config/eventvalidation.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"strings"

validator "github.com/asaskevich/govalidator"
"github.com/golang/glog"
)

// VASTEventElement indicates valid VAST event element
Expand Down Expand Up @@ -51,6 +52,7 @@ var trackingEventTypeMap = map[TrackingEventType]struct{}{
// validate verifies the events object and returns error if at least one is invalid.
func (e Events) validate(errs []error) []error {
if e.Enabled { // validate only if events are enabled
glog.Warning(`Don't enable this feature. It is still under developmment - https://github.com/prebid/prebid-server/issues/1725`)
if !isValidURL(e.DefaultURL) {
return append(errs, errors.New("Invalid events.default_url"))
}
Expand Down

0 comments on commit 7766601

Please sign in to comment.