Skip to content

Commit

Permalink
Merge pull request #915 from micahriggan/feature/express-redirect-hash
Browse files Browse the repository at this point in the history
Redirect /tx -> /#/tx
  • Loading branch information
matiu authored Aug 30, 2018
2 parents d204259 + cbc684a commit a6d4d5a
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions bitcore-node/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,15 @@ InsightUI.prototype.getRoutePrefix = function() {
InsightUI.prototype.setupRoutes = function(app, express) {
var self = this;
app.use(express.static(__dirname + '/../app/www'));
// if not in found, fall back to indexFile (404 is handled client-side)
/*
app.use(function(req, res) {
res.setHeader('Content-Type', 'text/html');
res.send(self.indexFile);
app.use((req, resp, next) => {
const url = req.originalUrl;
if (!url.includes("#") && !url.includes(".")) {
const redirectTo = `/#${url}`;
resp.redirect(redirectTo);
} else {
next();
}
});
*/
};

InsightUI.prototype.filterIndexHTML = function(data) {
Expand Down

0 comments on commit a6d4d5a

Please sign in to comment.