2 ms·
> It is more complex than that, because certain kinds of cross-site requests has always been allowed. GET and POST requests are allowed Request headers and bod
by masklinn 5y ago
> It is more complex than that, because certain kinds of cross-site requests has always been allowed. GET and POST requests are allowed
Request headers and body content-type are also a factor for POST, anything which couldn't be set through a FORM is forbidden.
The most common issue is that the request is only simple if its content-type is `application/x-www-form-urlencoded`, `multipart/form-data`, or `text/plain`. JSON POST requests usually run afoul that. The second big issue is setting bespoke headers as only Accept, Accept-Language, Content-Language, and Content-Type (restricted to the above list) are simple. There common sticking points are headers like Authorization.