Skip to content
This repository was archived by the owner on Jan 28, 2025. It is now read-only.
This repository was archived by the owner on Jan 28, 2025. It is now read-only.

SSG Redirect return JSON if page is directly accessed  #2430

Open
@cmaerz

Description

@cmaerz

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions