good morning!!!!

Skip to content
Snippets Groups Projects
Unverified Commit 0e007607 authored by Oleg Kovalov's avatar Oleg Kovalov Committed by Anmol Sethi
Browse files

Invert if to the more consistent style

parent 155bca6a
Branches
Tags
No related merge requests found
......@@ -221,11 +221,11 @@ func authenticateOrigin(r *http.Request) error {
if err != nil {
return fmt.Errorf("failed to parse Origin header %q: %w", origin, err)
}
if strings.EqualFold(u.Host, r.Host) {
return nil
}
if !strings.EqualFold(u.Host, r.Host) {
return fmt.Errorf("request Origin %q is not authorized for Host %q", origin, r.Host)
}
return nil
}
// DialOptions represents the options available to pass to Dial.
type DialOptions struct {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment