Allow app to be injectable to avoid dependency on Rails in client code

For integration tests in the client code that are not loading Rails, it
is useful to allow the app to be injectable.
Merge branch 'patrickmcelwee-additional_headers'