diff options
author | Daniel Friesel <derf@finalrewind.org> | 2015-05-10 11:28:09 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2015-05-10 11:28:09 +0200 |
commit | 0a3003a1463f97d4d9e91fa207b49c51fc009c0b (patch) | |
tree | 85382936c9e5b66ec57911447f4c5c42cb37dcd8 | |
parent | 066179c388f1386d497cbb34b9bfd96bffd0f67e (diff) |
add CORS support
-rw-r--r-- | index.pl | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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, |