Skip to content

Update Accept() docs #235

Closed
Closed
@jordipainan

Description

@jordipainan
// 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)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions