Implement thorough request signing in Rack.
gem 'rack-contrib-sign'
And then execute:
$ bundle
Or install it yourself as:
$ gem install rack-contrib-sign
Install in Rack by adding the following to your config.ru:
require 'rack/contrib/sign'
use Rack::Contrib::Sign::Middleware
This gem works by creating a receipt which gets HMAC hashed with a secret.