Next.js 14 make a page only available from an API route redirect

  Kiến thức lập trình

Is it possible to have a page that’s accessible only from an API route redirect? I’m trying to display a simple success page after a user accesses an API route from outside of the app however I don’t want to make that page available by URL to any user.

Tried using referer request header in Middleware however it did not seem to work in case of an API route redirect.

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT