Skip to content

Commit c08ea0f

Browse files
shblue21aldas
authored andcommitted
Fix typos in CSRFConfig comments
1 parent 98d99d5 commit c08ea0f

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

middleware/csrf.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@ const CSRFUsingSecFetchSite = "_echo_csrf_using_sec_fetch_site_"
2626
type CSRFConfig struct {
2727
// Skipper defines a function to skip middleware.
2828
Skipper Skipper
29-
// TrustedOrigin permits any request with `Sec-Fetch-Site` header whose `Origin` header
30-
// exactly matches the specified value.
29+
// TrustedOrigins permits any request with `Sec-Fetch-Site` header whose `Origin` header
30+
// exactly matches a configured origin.
3131
// Values should be formatted as Origin header "scheme://host[:port]".
3232
//
3333
// See [Origin]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin
3434
// See [Sec-Fetch-Site]: https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.html#fetch-metadata-headers
3535
TrustedOrigins []string
3636

37-
// AllowSecFetchSameSite allows custom behaviour for `Sec-Fetch-Site` requests that are about to
38-
// fail with CRSF error, to be allowed or replaced with custom error.
37+
// AllowSecFetchSiteFunc allows custom behaviour for `Sec-Fetch-Site` requests that are about to
38+
// fail with CSRF error, to be allowed or replaced with custom error.
3939
// This function applies to `Sec-Fetch-Site` values:
4040
// - `same-site` same registrable domain (subdomain and/or different port)
4141
// - `cross-site` request originates from different site

0 commit comments

Comments
 (0)