Redirect /tx to /#/tx
This commit is contained in:
parent
30852fd11c
commit
18df6d7878
@ -19,7 +19,7 @@ import { BlocksProvider } from '../providers/blocks/blocks';
|
|||||||
BrowserModule,
|
BrowserModule,
|
||||||
HttpModule,
|
HttpModule,
|
||||||
PagesModule,
|
PagesModule,
|
||||||
IonicModule.forRoot(InsightApp)
|
IonicModule.forRoot(InsightApp, {locationStrategy: 'path'})
|
||||||
],
|
],
|
||||||
bootstrap: [IonicApp],
|
bootstrap: [IonicApp],
|
||||||
entryComponents: [
|
entryComponents: [
|
||||||
|
|||||||
@ -45,13 +45,15 @@ InsightUI.prototype.getRoutePrefix = function() {
|
|||||||
InsightUI.prototype.setupRoutes = function(app, express) {
|
InsightUI.prototype.setupRoutes = function(app, express) {
|
||||||
var self = this;
|
var self = this;
|
||||||
app.use(express.static(__dirname + '/../app/www'));
|
app.use(express.static(__dirname + '/../app/www'));
|
||||||
// if not in found, fall back to indexFile (404 is handled client-side)
|
app.use((req, resp, next) => {
|
||||||
/*
|
const url = req.originalUrl;
|
||||||
app.use(function(req, res) {
|
if (!url.includes("#") && !url.includes(".")) {
|
||||||
res.setHeader('Content-Type', 'text/html');
|
const redirectTo = `/#${url}`;
|
||||||
res.send(self.indexFile);
|
resp.redirect(redirectTo);
|
||||||
|
} else {
|
||||||
|
next();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
*/
|
|
||||||
};
|
};
|
||||||
|
|
||||||
InsightUI.prototype.filterIndexHTML = function(data) {
|
InsightUI.prototype.filterIndexHTML = function(data) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user