How to remove dehydratedState from html?
I generate my pages with getStaticProps with NextJs.
In <script id="NEXT_DATA" type="application/json">{"props":{"pageProps":{"dehydratedState"... i have my product_ids, which i dont want to be shown.
How can i hide or encrypt this?

2 Replies
narrow-beigeOP•2y ago
The thing is, that i need these Ids for adminRoles, so they can manipulate products on right on client pages. But i dont want anyone to see them, is this possible?
harsh-harlequin•2y ago
No it's not possible to do that. Any data you send to the client is effectively public data
You'll have to do auth/ role checking on the server