Skip to content

Commit

Permalink
Merge pull request #4158 from Agoric/wallet-route
Browse files Browse the repository at this point in the history
fix(wallet): allow wallet app deep linking
  • Loading branch information
mergify[bot] authored Dec 7, 2021
2 parents 20b274a + 96d372e commit 230d998
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/solo/src/web.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ export async function makeHTTPListener(basedir, port, host, rawInboundCommand) {
};

const app = express();

// HTTP logging.
app.use(
morgan(`:method :url :status :res[content-length] - :response-time ms`, {
Expand All @@ -121,6 +122,10 @@ export async function makeHTTPListener(basedir, port, host, rawInboundCommand) {
app.use(express.static(htmldir));
app.use(express.static(new URL('../public', import.meta.url).pathname));

app.get('/wallet/*', (_, res) =>
res.sendFile(path.resolve('html', 'wallet', 'index.html')),
);

// The rules for validation:
//
// path outside /private: always accept
Expand Down

0 comments on commit 230d998

Please sign in to comment.