From 0a3003a1463f97d4d9e91fa207b49c51fc009c0b Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 10 May 2015 11:28:09 +0200 Subject: add CORS support --- index.pl | 2 ++ 1 file changed, 2 insertions(+) (limited to 'index.pl') diff --git a/index.pl b/index.pl index 1e709a2..0289989 100644 --- a/index.pl +++ b/index.pl @@ -505,6 +505,7 @@ sub handle_request { } if ( $template eq 'json' ) { + $self->res->headers->access_control_allow_origin('*'); my $json = $self->render_to_string( json => { api_version => $api_version, @@ -527,6 +528,7 @@ sub handle_request { } } elsif ( $template eq 'marudor' ) { + $self->res->headers->access_control_allow_origin('*'); my $json = $self->render_to_string( json => { departures => \@departures, -- cgit v1.2.3