Skip to content

Commit

Permalink
Redirect /tx to /#/tx
Browse files Browse the repository at this point in the history
  • Loading branch information
Micah Riggan committed Apr 11, 2018
1 parent 30852fd commit 18df6d7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { BlocksProvider } from '../providers/blocks/blocks';
BrowserModule,
HttpModule,
PagesModule,
IonicModule.forRoot(InsightApp)
IonicModule.forRoot(InsightApp, {locationStrategy: 'path'})
],
bootstrap: [IonicApp],
entryComponents: [
Expand Down
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 18df6d7

Please sign in to comment.