File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,16 +26,16 @@ const CSRFUsingSecFetchSite = "_echo_csrf_using_sec_fetch_site_"
2626type 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
You can’t perform that action at this time.
0 commit comments