You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The request mode has five different values: same-origin, cors, no-cors, navigate, or websocket. Including its value in Sec-Metadata would have a few benefits:
It would allow distinguishing navigation requests from subresource requests without checking destination for document and nested-document (checking for mode=navigate seems easier for developers).
It more clearly identifies CORS requests (which the server can generally exempt from Sec-Metadata checks because there already must exist logic that checks the origin and sets the right ACA* headers). Currently these requests can be identified by looking for destination="" and the presence of an Origin header, which is somewhat clunky.
It's likely more stable than the destination value. If developers write server-side checks based on a complete list of known values (which is a bad idea overall, but would be possible), then checking the mode could be less error-prone (e.g. if mode == "no-cors" && site != "same-origin": #reject).
Overall, it seems similar to the original idea of the target value (with the possible values of subresource, top-level or nested) but doesn't require introducing a new concept.
Note that we might still need the nested-document value in destination to distinguish between top-level and nested navigations (or we could expose this in another way).
The request mode has five different values:
same-origin
,cors
,no-cors
,navigate
, orwebsocket
. Including its value inSec-Metadata
would have a few benefits:document
andnested-document
(checking formode=navigate
seems easier for developers).destination=""
and the presence of anOrigin
header, which is somewhat clunky.destination
value. If developers write server-side checks based on a complete list of known values (which is a bad idea overall, but would be possible), then checking themode
could be less error-prone (e.g.if mode == "no-cors" && site != "same-origin": #reject
).Overall, it seems similar to the original idea of the
target
value (with the possible values ofsubresource
,top-level
ornested
) but doesn't require introducing a new concept.@mikewest
The text was updated successfully, but these errors were encountered: