Is there a way to allow multiple cross-domains using the Access-Control-Allow-Origin
header?
(有没有一种方法可以使用Access-Control-Allow-Origin
标头允许多个跨域?)
I'm aware of the *
, but it is too open.
(我知道*
,但是它太开放了。)
I really want to allow just a couple domains. (我真的只想允许几个域名。)
As an example, something like this:
(例如,如下所示:)
Access-Control-Allow-Origin: http://domain1.example, http://domain2.example
I have tried the above code but it does not seem to work in Firefox.
(我已经尝试了上面的代码,但是它似乎在Firefox中不起作用。)
Is it possible to specify multiple domains or am I stuck with just one?
(是否可以指定多个域,还是我只能使用一个?)
ask by Thomas J Bradley translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…