Access-Control-Allow-Origin Multiple Origin Domains?

前端 未结 30 2059
隐瞒了意图╮
隐瞒了意图╮ 2020-11-21 07:08

Is there a way to allow multiple cross-domains using the Access-Control-Allow-Origin header?

I\'m aware of the *, but it is too open. I rea

30条回答
  •  礼貌的吻别
    2020-11-21 07:16

    Maybe I am wrong, but as far as I can see Access-Control-Allow-Origin has an "origin-list" as parameter.

    By definition an origin-list is:

    origin            = "origin" ":" 1*WSP [ "null" / origin-list ]
    origin-list       = serialized-origin *( 1*WSP serialized-origin )
    serialized-origin = scheme "://" host [ ":" port ]
                      ; , ,  productions from RFC3986
    

    And from this, I argue different origins are admitted and should be space separated.

提交回复
热议问题