Closed
Description
// Accept will not allow cross origin requests by default.
// See the InsecureSkipVerify option to allow cross origin requests.
//
// Accept will write a response to w on all errors.
func Accept(w http.ResponseWriter, r *http.Request, opts *AcceptOptions) (*Conn, error) {
return accept(w, r, opts)
}
InsecureSkipVerify is deprecated as mentioned in docs. When you see it is deprecated you end up in AcceptOptions{OriginPatterns: []string{x}}.
I suggest to change the code snippet mentioned above by:
// Accept will not allow cross origin requests by default.
// See the OriginPatterns option to allow cross origin requests.
//
// Accept will write a response to w on all errors.
func Accept(w http.ResponseWriter, r *http.Request, opts *AcceptOptions) (*Conn, error) {
return accept(w, r, opts)
}