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
I have spent a significant amount of time trying to resolve a situation where for an OPTIONS request, the preflight looks perfect but the actual request is considered an error by the browser. It turns out that the reason is that there is no Access-Control-Allow-Origin: * header in the actual request response. When I added it to the response, things work great!
The REQUEST_METHOD is "OPTIONS" on the actual request, but is not a preflight. Therefore, no cors_headers will be present. As I understand it, the Resource Processing Model indicates that it would be correct to "add a single Access-Control-Allow-Origin header, with either the value of the Origin header or the string "*" as value" as step three of any of "Simple Cross-Origin Request, Actual Request, and Redirects" server response.
I would like to fix this immediately if @cyu agrees with this analysis. If there is disagreement, I would like some interaction about why I cannot make an OPTIONS request. I believe this is related to #24.
The text was updated successfully, but these errors were encountered:
I have spent a significant amount of time trying to resolve a situation where for an OPTIONS request, the preflight looks perfect but the actual request is considered an error by the browser. It turns out that the reason is that there is no
Access-Control-Allow-Origin: *
header in the actual request response. When I added it to the response, things work great!Consider the current behavior:
The
REQUEST_METHOD
is"OPTIONS"
on the actual request, but is not a preflight. Therefore, no cors_headers will be present. As I understand it, the Resource Processing Model indicates that it would be correct to "add a single Access-Control-Allow-Origin header, with either the value of the Origin header or the string "*" as value" as step three of any of "Simple Cross-Origin Request, Actual Request, and Redirects" server response.I would like to fix this immediately if @cyu agrees with this analysis. If there is disagreement, I would like some interaction about why I cannot make an OPTIONS request. I believe this is related to #24.
The text was updated successfully, but these errors were encountered: