connect-history-api-fallback
connect-history-api-fallback copied to clipboard
Dealing with trailing slashes
Hi,
connect-history-api-fallback
seems to disable Express's ability to handle trailing slashes, which normally just get removed.
For example:
- https://my.app/signup - works.
- https://my.app/signup/ - fails.
It seems like there must be some simple way around this, but I haven't been able to find one. Is there?
Thank you! A full snippet from my code is below, if that helps clarify things.
app.use(
history({
rewrites: [
{from: /\/signup\//, to:'/signup'}
]
}),
express.static(path.join(dirname, 'some/directory'))
);