[Openstack] Nova middleware for enabling CORS?

John Dickinson me at not.mn
Tue Oct 30 18:08:03 UTC 2012


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 <renierm at 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 at lists.launchpad.net
> Unsubscribe : https://launchpad.net/~openstack
> More help   : https://help.launchpad.net/ListHelp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4329 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20121030/29637701/attachment.bin>


More information about the Openstack mailing list