Skip to content

Commit

Permalink
calculate subdomain offset based on APMSERVE_HOST (#22)
Browse files Browse the repository at this point in the history
need to support arbitrary length hosts like aragonpm.com and
aragonpm-test.aragon.network
  • Loading branch information
pbostrom authored and izqui committed Oct 19, 2018
1 parent 6987f3c commit 452c91c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const routers = networks.map(({ network, sub }) => {
return subdomain(sub || `*.${network}`, apmRouter(network))
})

app.set("subdomain offset", process.env.APMSERVE_HOST.split('.').length)
routers.forEach(router => app.use(router))

// Error handler
Expand Down

0 comments on commit 452c91c

Please sign in to comment.