shared
¶
asset_url
¶
The URL a template loads a built frontend file from: /mojo-static/dist/<name>, or the TypeScript or CSS source Vite serves for it when MOJO_DOJO_DEV is set. name is a key of ts/entries.json, the list vite.config.ts builds from too, so an unknown name raises KeyError in dev.
Source code in src/mujoco_mojo/utils/layers/dojo/shared.py
is_localhost
¶
Python
is_localhost(request: Request) -> bool
Whether the request's direct TCP peer is the loopback interface, regardless of which interface the server itself is bound to. Shared by every router that gates a write behind "only from the machine running Dojo" (settings, and the What's Changed toggle).