This middleware will automatically redirect any clients that
express a desire for text/html content away from the API and to
the configured webclient. It assumes that the webclient will have
an identical URL structure after the API root, or have sane 404
handling.
This feature is being added to simplify generating a URL in email.
We point the user at the API, and the API will redirect the user
to the appropriate location. If, instead, the client sends a
different accept header, then this will not trigger and return
the raw data instead.
Example:
GET https://storyboard.openstack.org/api/v1/projects
303 https://storyboard.openstack.org/#!/projects
Future work on this feature will intelligently check for search
engine bots, and return a scrapeable html page for SEO.
Change-Id: Id98e12f85ce1523ab3982d070c438583d51ce9cb