Browser code reads the page’s http prop
The message
MARKLESS_SERVER_ONLY_PROP_BROWSER_READ: "<componentName>" reads its server-only prop "<propName>" (<description>) in <role>: `<source>`. That code runs in the browser after resume.
"<propName>" exists only while "<componentName>" renders on the server. Everything browser code reads is serialized into the page's HTML, so this read would send <description> to the browser, where anyone viewing the page can read it.
Read "<propName>" in the component body, which runs only on the server, and hand the browser just the plain value it needs, for example `let value = state(<propName>.someField)`. The state() copy is serialized, and nothing else of "<propName>" is.
https://markless.dev/errors/MARKLESS_SERVER_ONLY_PROP_BROWSER_READWords in angle brackets change from case to case.
Why
A page's http prop holds the request, with its cookies and headers. It exists only while the page renders on the server. Here an event handler, an attach, a computed() the browser re-runs, or markup the browser rebuilds reads it. Whatever browser code reads is written into the page's HTML, so this would send the visitor's cookies and headers along with the page.
Fix
Read http in the page body, which runs only on the server. If the browser needs one value from it, copy that value into state() there.
export default function Search({ http }: PageProps) @{ let query = state(http.url.searchParams.get('q') ?? ''); <button onClick={() => console.log(query)}>{query}</button>}