Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5ef6423

Browse files
committedMay 17, 2024·
change assets env entry to better namespace
PSGI env entries starting with "psgix." are reserved, so we should be using our own namespace.
1 parent a10ebeb commit 5ef6423

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎lib/MetaCPAN/Middleware/Static.pm

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ sub wrap {
5151
if ($dev_mode) {
5252
$assets = $get_assets->();
5353
}
54-
push @{ $env->{'psgix.assets'} ||= [] }, @$assets;
54+
push @{ $env->{'metacpan.assets'} ||= [] }, @$assets;
5555
$app->($env);
5656
};
5757
};

‎lib/MetaCPAN/Web/View/Xslate.pm

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ around render => sub {
7474

7575
$vars->{api_public} = $self->api_public;
7676
$vars->{source_host} = $self->source_host;
77-
$vars->{assets} = $req->env->{'psgix.assets'} || [];
77+
$vars->{assets} = $req->env->{'metacpan.assets'} || [];
7878
$vars->{current} = {
7979
$c->action->reverse => 1,
8080
$c->request->uri->path => 1,

0 commit comments

Comments
 (0)
Please sign in to comment.