Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

trav1s's avatar

How to hide some information in data-page?

I successfully deployed a project with Laravel 12 + React + TSX and discovered that even the admin routes are visible in the data-page HTML.

Here's my HandleInertiaRequests

Here's my ssr.tsx:

How to hide such sensitive information about admin routes?

0 likes
2 replies
martinbean's avatar

@trav1s By not sending any data to the page. Inertia is client-side. If you don’t want data to be visible there, don’t send it in the first place.

Please or to participate in this conversation.