KEMBAR78
Preview mode pages can be accessed publicly · Issue #16020 · vercel/next.js · GitHub
Skip to content

Preview mode pages can be accessed publicly #16020

@kyashrathore

Description

@kyashrathore

Description

I have a post in draft, path for which is /posts/id. I want for rebuild it on request since data is new.
So I made it a preview url using preview mode feature. Now the url is /api/preview?secret=token&slug=/posts/id.
Now when I make this request this page is generated and stored on disk and any one with url /posts/id can visit this.

To Reproduce

Steps to reproduce

This sandbox is not working because it says res.redirect is not a function (which we can ignore) but you can see code or check repo also.

Go to this sandbox and check

Expected behavior

I am no expert but I think it should not write preview pages on disk, it should serve them from memory. when someone visit /posts/id it should return 404.

System information

  • OS [ Windows]
  • Version of Next.js: [lates]

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions