+helper ip => sub {
+ my $self = shift;
+ return
+ $self->req->headers->header('X-Forwarded-For')
+ || $self->req->headers->header('X-Real-IP')
+ || $self->tx->{remote_address}
+ ;
+};
+
+
+get '/js/services.js' => sub {
+ my $self = shift;
+ $self->stash( VERSION => $VERSION );
+ $self->stash( couchdb_database => $couchdb_database );
+ $self->render( 'js/services', format => 'js' );
+};
+
+# short public URLs
+get '/hr' => sub { shift->redirect_to('/lang/hr/drzb2013') };
+get '/en' => sub { shift->redirect_to('/lang/en/drzb2013') };
+