The Sec-Fetch-Site header will allow us to validate the origin in a cleaner way. Also, because the clients to the transports are fewer, we can simply enforce the field to be set.
The question is which API we will want to be set. One option is to do check_origin: :sec_fetch_site, but since :sec_fetch_site itself has a few options, that's may become cumbersome. Another option is to introduce another keyword altogether. When this keyword is given, it disables check_origin and check_csrf (unless those are explicitly given).
The Sec-Fetch-Site header will allow us to validate the origin in a cleaner way. Also, because the clients to the transports are fewer, we can simply enforce the field to be set.
The question is which API we will want to be set. One option is to do
check_origin: :sec_fetch_site, but since:sec_fetch_siteitself has a few options, that's may become cumbersome. Another option is to introduce another keyword altogether. When this keyword is given, it disablescheck_originandcheck_csrf(unless those are explicitly given).