Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OTT-421: Added warning when events.enabled=true #257

Merged
merged 15 commits into from
Feb 17, 2022
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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