Loading lib/DBInfoscreen.pm +2 −1 Original line number Diff line number Diff line Loading @@ -289,7 +289,8 @@ sub startup { $r->get('/')->to('stationboard#handle_request'); $r->get('/multi/*station')->to('stationboard#handle_request'); $r->get('/*station')->to('stationboard#handle_request'); $r->get( '/*station' => [ format => [ 'html', 'json' ] ] ) ->to( 'stationboard#handle_request', format => undef ); $self->types->type( json => 'application/json; charset=utf-8' ); Loading lib/DBInfoscreen/Controller/Stationboard.pm +6 −1 Original line number Diff line number Diff line Loading @@ -469,7 +469,12 @@ sub handle_request { # (or used by) marudor.de, it was renamed to 'json'. Many clients won't # notice this for year to come, so we make sure mode=marudor still works as # intended. if ( $template eq 'marudor' ) { if ( $template eq 'marudor' or ( $self->req->headers->accept and $self->req->headers->accept eq 'application/json' ) ) { $template = 'json'; } Loading Loading
lib/DBInfoscreen.pm +2 −1 Original line number Diff line number Diff line Loading @@ -289,7 +289,8 @@ sub startup { $r->get('/')->to('stationboard#handle_request'); $r->get('/multi/*station')->to('stationboard#handle_request'); $r->get('/*station')->to('stationboard#handle_request'); $r->get( '/*station' => [ format => [ 'html', 'json' ] ] ) ->to( 'stationboard#handle_request', format => undef ); $self->types->type( json => 'application/json; charset=utf-8' ); Loading
lib/DBInfoscreen/Controller/Stationboard.pm +6 −1 Original line number Diff line number Diff line Loading @@ -469,7 +469,12 @@ sub handle_request { # (or used by) marudor.de, it was renamed to 'json'. Many clients won't # notice this for year to come, so we make sure mode=marudor still works as # intended. if ( $template eq 'marudor' ) { if ( $template eq 'marudor' or ( $self->req->headers->accept and $self->req->headers->accept eq 'application/json' ) ) { $template = 'json'; } Loading