[openstreetmap-website] Allow cross-origin request to API (#138)

John Firebaugh notifications at github.com
Sun Oct 21 22:15:08 GMT 2012

> @@ -0,0 +1,31 @@
> +require File.dirname(__FILE__) + '/../test_helper'
> +
> +class CORSTest < ActionController::IntegrationTest
> +  # https://github.com/rails/rails/commit/ad46884af567d6f8d6d8d777f372c39e81a560ba

The implementation comes from [this `define_method` block](https://github.com/rails/rails/blob/ad46884af567d6f8d6d8d777f372c39e81a560ba/actionpack/lib/action_dispatch/testing/integration.rb#L321-L331).

I doubt we'll need to integration test OPTIONS requests anywhere else; CORS is the only common use of it I know of. So I'd prefer to make the motivation for it more obvious by keeping it close to its use.

Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20121021/574c7637/attachment.html>

More information about the rails-dev mailing list