Skip to content

Commit f176d65

Browse files
committed
be/int/web/reception/browser: fixe OriginChecker returns with failure when an allowance found
1 parent 16dc28b commit f176d65

File tree

1 file changed

+1
-1
lines changed
  • backend/internal/web/reception/browser

1 file changed

+1
-1
lines changed

backend/internal/web/reception/browser/origin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func (c OriginChecker) preflight(w http.ResponseWriter, r *http.Request) {
3636
func (c OriginChecker) actual(w http.ResponseWriter, r *http.Request) {
3737
allowance := matchAny(c.Allowances, r.Header.Get(headers.Origin), r.Method, r.URL.Path, slices.Collect(maps.Keys(r.Header)))
3838

39-
if allowance != nil {
39+
if allowance == nil {
4040
http.Error(w, "Please try again using the official website.", http.StatusForbidden)
4141
return
4242
}

0 commit comments

Comments
 (0)