Security implications of adding all domains to CORS (Access-Control-Allow-Origin: *)

后端 未结 6 901
深忆病人
深忆病人 2020-12-07 22:51

It is said that instead of adding all domains to CORS, one should only add a set of domains. Yet it is sometimes not trivial to add a set of domains. E.g. if I want to publi

6条回答
  •  太阳男子
    2020-12-07 23:15

    Except of csauve's one, none of the replies answer my original question.

    To answer my question; It seems that as long as Access-Control-Allow-Credentials is not set then there is no security problem.

    (Which makes me wonder why the spec requires preflight when Access-Control-Allow-Credentials is not set?)

提交回复
热议问题