<p>In config/application.rb:</p>
<pre style='color:#555'>> @@ -72,6 +72,14 @@ class Application < Rails::Application
> # Version of your assets, change this if you want to expire all your assets
> config.assets.version = '1.0'
>
> + # Allow cross-origin API requests
</pre>
<p>Ajax frameworks tend to add a few custom headers like <code>X-Requested-By</code> automatically. Prototype <a href="http://www.tsheffler.com/blog/?p=428">reportedly</a> also adds <code>X-Prototype-Version</code>. Since we don't have any restrictions on request headers coming from non-browsers, I think it makes sense to have the same permissiveness for browser requests.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">
—<br>
Reply to this email directly or <a href='https://github.com/openstreetmap/openstreetmap-website/pull/138/files#r1904999'>view it on GitHub</a>.
</p>
<img src='https://github.com/notifications/beacon/uTRSc6ihLa7Shf84BpiOpmLWAu4oQih75mggZl1E8_nNfp_iEXETdQVsjYwMcApp.gif' height='1' width='1'>