Skip to content

Commit

Permalink
fix code style
Browse files Browse the repository at this point in the history
  • Loading branch information
htrgouvea committed Feb 7, 2024
1 parent 39956a9 commit 3135aa7
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions app.pl
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,19 @@
app -> hook(
after_render => sub {
my ($self, $output, $format) = @_;
$self ->res ->headers -> header("Content-Security-Policy" => "default-src \"self\"");
$self ->res ->headers -> header("X-Content-Type-Options" => "nosniff");
$self ->res ->headers -> header("X-Frame-Options" => "DENY");
$self ->res ->headers -> header("Strict-Transport-Security" => "max-age=31536000; includeSubDomains");
$self ->res ->headers -> content_type("application/json");

$self -> res ->headers -> header("Content-Security-Policy" => "default-src \"self\"");
$self -> res ->headers -> header("X-Content-Type-Options" => "nosniff");
$self -> res ->headers -> header("X-Frame-Options" => "DENY");
$self -> res ->headers -> header("Strict-Transport-Security" => "max-age=31536000; includeSubDomains");
$self -> res ->headers -> content_type("application/json");
}
);

app -> hook(
before_dispatch => sub {
my $cors = shift;

$cors -> res -> headers -> header("Access-Control-Allow-Origin" => "*");
$cors -> res -> headers -> header("Access-Control-Allow-Methods" => "GET, OPTIONS");
$cors -> res -> headers -> header("Access-Control-Allow-Headers" => "Origin, Content-Type, Accept");
Expand Down

0 comments on commit 3135aa7

Please sign in to comment.