You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/08/05 14:05:38 UTC

[GitHub] [apisix] spacewander commented on issue #1983: bug: cors when the request is a preflight request we shouldn't set the Access-Control-Allow-Headers *

spacewander commented on issue #1983:
URL: https://github.com/apache/apisix/issues/1983#issuecomment-669213556


   According to the spec, it looks like that `Access-Control-Allow-Method` and `Access-Control-Allow-Headers` are only for preflight request.
   https://fetch.spec.whatwg.org/#http-access-control-allow-methods
   https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Headers
   
   So the only thing need to be restricted is `Access-Control-Expose-Headers`. For example, we can require `Access-Control-Expose-Headers` not to be `*` when `Access-Control-Allow-Credentials: true`. 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org