title: Sinatra and Rack Protection setting
body: <p>I am using Sinatra and CORS to accept a file upload on domain A (hefty.burger.com). Domain B (fizzbuzz.com) has a form that uploads a file to a route on A. </p>
  
  <p>I have an options route and a post route, both named '/uploader'.</p>
  
  <pre><code>options '/uploader' do
    headers 'Access-Control-Allow-Origin' =&gt; 'http://fizz.buzz.com',
    'Access-Control-Allow-Methods' =&gt; 'POST'
    200
  end 
  
  post '/uploader' do
    ... 
    content_type :json
    [{:mary =&gt; 'little lamb'}].to_json
  end
  </code></pre>
  
  <p>The options gets hit first... and it works.. then the post gets hit and returns a 403. </p>
  
  <p>If I disable protection, the post works... what kind of protection do I need to exclude from a list to maintain protection but allow these posts through?</p>
  
  <p>I have only recently been burned by the new Rack protection kicking in on Heroku and causing me some grief... anyone have a good pointer for what to do here? The reason I say that, is all of a sudden I am seeing log entries with alerts to session hijacking issues (almost certainly due to nothing more than running > 1 Dyno for the App). I see rack-protection (1.2.0) in my Gemfile.lock even though I never asked for it... something in my manifest is calling for it, so it is loaded, but nothing in my Sinatra App even tries to require it or set it up.</p>