Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dealing with trailing slashes #77

Open
meatnordrink opened this issue Oct 15, 2020 · 0 comments
Open

Dealing with trailing slashes #77

meatnordrink opened this issue Oct 15, 2020 · 0 comments

Comments

@meatnordrink
Copy link

Hi,

connect-history-api-fallback seems to disable Express's ability to handle trailing slashes, which normally just get removed.

For example:

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'))
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant