Merge pull request #915 from micahriggan/feature/express-redirect-hash

Redirect /tx -> /#/tx
This commit is contained in:
Matias Alejo Garcia 2018-08-30 11:46:22 -03:00 committed by GitHub
commit a6d4d5a1b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) {