Skip to content

Commit

Permalink
support x-forwarded-for for multiverse
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed Jul 7, 2024
1 parent a918b11 commit 6c3d8b5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ app.use(function(req, res, next){
req.universe = process.env.UNIVERSE;
} else if(req.app.get('env') === 'production'){
req.universe = req.hostname.replace('.r-universe.dev', '');
res.locals.vhost = req.headers['r-universe-vhost'];
}
res.locals.universe = req.universe || 'ropensci';
res.locals.node_env = req.app.get('env');
Expand Down
6 changes: 2 additions & 4 deletions views/pkginfo.pug
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,13 @@ block content
span.package-details-gist-name #{Package}
span.pl-pds '
| ,
span.pl-v repos
span.pl-v repos
span.pl-k =
span.nocran
| c(
span.pl-s
span.pl-pds '
| https://
span.title-universe-name #{universe}
| .r-universe.dev
| https://#{vhost || `${universe}.r-universe.dev`}
span.pl-pds '
| ,
span.pl-s
Expand Down

0 comments on commit 6c3d8b5

Please sign in to comment.