Skip to content

Commit

Permalink
access-control: allow internal redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
gioelecerati authored and emranemran committed Apr 30, 2024
1 parent 4aa81ad commit b8b6500
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions handlers/accesscontrol/access-control.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,14 @@ func (ac *AccessControlHandlersCollection) IsAuthorized(ctx context.Context, pla
}
}

if payload.Origin == "null" && payload.Referer != "" {
match, _ := regexp.MatchString(`(?:prod|staging)-.*catalyst-\d+`, payload.Referer)
if match {
glog.Infof("Allowing on redirect for playbackID %v origin=%v referer=%v host=%v", playbackID, payload.Origin, payload.Referer, payload.Host)
return true, nil
}
}

start := time.Now()
defer func() {
metrics.Metrics.AccessControlRequestDurationSec.
Expand Down

0 comments on commit b8b6500

Please sign in to comment.