Limiting the before_render treatment to rest request only

So the restful API can live along with a regular html web site/app.