Skip to content

Instantly share code, notes, and snippets.

@Disha-Shah
Last active April 7, 2017 09:51
Show Gist options
  • Save Disha-Shah/23bd7b03eab07adba69d1b4ebbe3a9e7 to your computer and use it in GitHub Desktop.
Save Disha-Shah/23bd7b03eab07adba69d1b4ebbe3a9e7 to your computer and use it in GitHub Desktop.
Rails - Integrating Heroku deployment version in Request header

1.. Enable runtime dyno for Heroku with following command :

heroku labs:enable runtime-dyno-metadata -a app-name

2.. Add custom header for all requests. Make the following change in application.rb

 config.action_dispatch.default_headers.merge!('X-RELEASE-VERSION' => ENV['HEROKU_RELEASE_VERSION'])

You will receive HEROKU_RELEASE_VERSION values after next deployment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment