Since the CORS support in Swift allows the preflight OPTIONS response to be 
different on a per-container basis (which is correct in a multi-tenant system), 
the CORS support was added directly into Swift's proxy server rather than as 
middleware. In order to fulfill the OPTIONS request, container information 
needs to be read from the system, and the proxy server already has this 
information (probably in cache). Implementing the CORS support as middleware 
would require duplicating much of the code and framework that already exists in 
Swift's proxy server. CORS support in Swift was correctly implemented.

--John




On Oct 30, 2012, at 10:57 AM, Renier Morales <reni...@us.ibm.com> wrote:

> On Oct 30, 2012, at 1:08 PM, David Kranz wrote:
> 
>> On 10/30/2012 12:43 PM, Renier Morales wrote:
>>> Hello,
>>> 
>>> I'm wondering if someone has already created a nova paste filter/middleware 
>>> for enabling Cross-Origin Resource Sharing (CORS), allowing a web page to 
>>> access the openstack api from another domain. Any pointers out there?
>>> 
>>> Thanks,
>>> 
>>>    -Renier
>>> 
>>> 
>> This https://review.openstack.org/#/c/6909/ was an attempt to add such 
>> middleware to swift. It is
>> generic CORS support but seems
>> to have been rejected in favor of putting CORS support in swift directly and 
>> checked in last week:
>> https://github.com/openstack/swift/commit/74b27d504d310c70533175759923c21df158daf9
> 
> Question for the list: this supports CORS in Swift. Should other services 
> (nova, keystone, glance) do the same kind of intrinsic CORS enablement?
> It's surprising that something like CORS, if done, would not be done in a 
> more generic plug-in friendly that you could use across all services.
> 
>       -Renier
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to     : openstack@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~openstack
> More help   : https://help.launchpad.net/ListHelp

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to     : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp

Reply via email to