-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Closed
Copy link
Labels
DocumentationIssues describing a change to documentation.Issues describing a change to documentation.FixPendingIssues that have a fix which has not yet been reviewed or submitted.Issues that have a fix which has not yet been reviewed or submitted.help wanted
Description
The CrossOriginProtection.AddInsecureBypassPattern
method of the net/http
package panics if the given pattern conflicts with one that is already bypassed.
This could be inferred from the method's documentation, which states:
The pattern syntax and precedence rules are the same as [ServeMux](https://pkg.go.dev/net/[email protected]#ServeMux).
However, in the ServeMux
documentation it is explicitly noted that ServeMux.Handle
and ServeMux.HandleFunc
may panic, while this is not mentioned for CrossOriginProtection.AddInsecureBypassPattern
.
I suggest updating the documentation of both AddInsecureBypassPattern
and ServeMux
to clearly indicate which methods may panic in case of a conflict.
Metadata
Metadata
Assignees
Labels
DocumentationIssues describing a change to documentation.Issues describing a change to documentation.FixPendingIssues that have a fix which has not yet been reviewed or submitted.Issues that have a fix which has not yet been reviewed or submitted.help wanted