Browse Source

+ CMTD::Helpers->allow_cors

master
Alex 'AdUser' Z 7 years ago
parent
commit
1fd472ef7e
  1. 5
      lib/CMTD/Helpers.pm

5
lib/CMTD/Helpers.pm

@ -11,6 +11,11 @@ use Mojo::URL;
sub register { sub register {
my ($self, $app) = @_; my ($self, $app) = @_;
$app->helper(allow_cors => sub {
my ($c) = @_;
$c->res->headers->add('Access-Control-Allow-Origin' => '*');
return;
});
$app->helper(referrer => sub { $app->helper(referrer => sub {
my ($c) = @_; my ($c) = @_;
my $url = $c->req->headers->referrer || my $url = $c->req->headers->referrer ||

Loading…
Cancel
Save