Change to * rule for CORS

This commit is contained in:
Tom Bloor 2017-04-25 19:48:29 +01:00
parent 1cd92d1e12
commit fed62641ad

View file

@ -115,7 +115,7 @@ sub startup {
$api_public_get->options('*' => sub { $api_public_get->options('*' => sub {
my $self = shift; my $self = shift;
$self->res->headers->header('Access-Control-Allow-Origin'=> 'http://localhost:7000'); $self->res->headers->header('Access-Control-Allow-Origin'=> '*');
$self->res->headers->header('Access-Control-Allow-Credentials' => 'true'); $self->res->headers->header('Access-Control-Allow-Credentials' => 'true');
$self->res->headers->header('Access-Control-Allow-Methods' => 'GET, OPTIONS, POST, DELETE, PUT'); $self->res->headers->header('Access-Control-Allow-Methods' => 'GET, OPTIONS, POST, DELETE, PUT');
$self->res->headers->header('Access-Control-Allow-Headers' => 'Content-Type, X-CSRF-Token'); $self->res->headers->header('Access-Control-Allow-Headers' => 'Content-Type, X-CSRF-Token');