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

SSG Redirect return JSON if page is directly accessed #2430

Open
cmaerz opened this issue Apr 21, 2022 · 4 comments
Open

SSG Redirect return JSON if page is directly accessed #2430

cmaerz opened this issue Apr 21, 2022 · 4 comments

Comments

@cmaerz
Copy link
Contributor

cmaerz commented Apr 21, 2022

Issue Summary

When i access a SSG page that returns a redirect the JSON response is shown instead of the redirect made. The root cause of this is the PR #2393 from @KensukeTakahara i guess.
image

Pretty sure there just needs to be a if some where.

Actual behavior

When a SSG page returns a redirect and you access it directly it returns JSON instead of the actual redirect response. When access the .json version of the page it should be fine. Can't test this currently.

Expected behavior

When access directly it should return the redirect response directly.

Steps to reproduce

  1. Return a redirect in getStaticProps
  2. Access the page directly

Versions

It works on 3.7.0-alpha.10 every version above breaks it.

@cmaerz
Copy link
Contributor Author

cmaerz commented May 10, 2022

@dphang Any Update here? Or a hint how to fix it? Imho thats a breaking change.

@dphang
Copy link
Collaborator

dphang commented May 12, 2022 via email

@cmaerz
Copy link
Contributor Author

cmaerz commented Jun 10, 2022

@dphang Any Updates here?

@jcricaro
Copy link

jcricaro commented Sep 2, 2022

@dphang up

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

3 participants