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

@astrojs/node is not handling redirects on production #7832

Closed
1 task done
fprl opened this issue Jul 27, 2023 · 0 comments · Fixed by #7856
Closed
1 task done

@astrojs/node is not handling redirects on production #7832

fprl opened this issue Jul 27, 2023 · 0 comments · Fixed by #7856
Assignees
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority)

Comments

@fprl
Copy link
Contributor

fprl commented Jul 27, 2023

What version of astro are you using?

2.9.3

Are you using an SSR adapter? If so, which one?

Node

What package manager are you using?

npm

What operating system are you using?

Mac

What browser are you using?

Chrome

Describe the Bug

Hello everyone, thanks a lot for checking this.

I set some redirects in astro.config.mjs:

redirects: {
    '/my-account/my-bookings': '/nl/my-account/bookings',
    '/my-account/my-bookings/[hash]': '/nl/my-account/bookings/[hash]',
    '/my-account/my-profile': '/nl/my-account/profile',
    '/en/my-account/my-bookings': '/my-account/bookings',
    '/en/my-account/my-bookings/[hash]': '/my-account/bookings/[hash]',
    '/en/my-account/my-profile': '/my-account/profile',
  },

On dev everything work as expected but running the server will always get you redirected to /.

What's the expected result?

The adapter should respect the redirects.

Link to Minimal Reproducible Example

https://github.com/fprl/astro-redirects-repro

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Jul 27, 2023
@matthewp matthewp added the - P4: important Violate documented behavior or significantly impacts performance (priority) label Jul 28, 2023
@matthewp matthewp self-assigned this Jul 28, 2023
@github-actions github-actions bot removed the needs triage Issue needs to be triaged label Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants