-
I've found a way to encrypt data by overriding NextScripts method, which a hacky way. But I cant really find a place where can I add decryption step in |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 10 replies
-
I haven't tested it but if this data you want to encrypt is the one you return from That said, even if |
Beta Was this translation helpful? Give feedback.
-
It's very important to encrypt sensitive data in some cases, for example, client side js rendering user's account, access token to avoid spider's Crawling, proxy caches. |
Beta Was this translation helpful? Give feedback.
-
why NEXT_DATA exists? can't there be an option to bake data into HTML in nextjs? |
Beta Was this translation helpful? Give feedback.
-
OK, 2 years passed, there's still no official solution, I wrote a package for myself in 4 hours, encrypt props with des or base64, it's not a complete solution, but solved my problem! https://github.com/hugejile/with-next-encrypt |
Beta Was this translation helpful? Give feedback.
-
If you are still looking for a solution to this, we recommend incrementally adopting the Next.js App Router, which allows you to keep this entire payload on the server (in a Server Component). |
Beta Was this translation helpful? Give feedback.
If you are still looking for a solution to this, we recommend incrementally adopting the Next.js App Router, which allows you to keep this entire payload on the server (in a Server Component).