Skip to content

Commit 3149225

Browse files
committed
Clarify docs on Accept
1 parent def4f37 commit 3149225

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

accept.go

+3
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ func verifyClientRequest(w http.ResponseWriter, r *http.Request) error {
8181
// Accept will reject the handshake if the Origin domain is not the same as the Host unless
8282
// the InsecureSkipVerify option is set. In other words, by default it does not allow
8383
// cross origin requests.
84+
//
85+
// If an error occurs, Accept will always write an appropriate response so you do not
86+
// have to.
8487
func Accept(w http.ResponseWriter, r *http.Request, opts AcceptOptions) (*Conn, error) {
8588
c, err := accept(w, r, opts)
8689
if err != nil {

0 commit comments

Comments
 (0)