You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(objectos): 404 unknown hostnames instead of serving control-plane console
Without a host-resolution guard, unknown subdomains like
'demo-xxx.objectos.app' rendered the same console UI as a real env
because the static Console SPA is served independently of the request
host. The user could not tell the env did not exist.
Add a request-level middleware in apps/objectos/server/index.ts that:
- Activates when OS_ROOT_DOMAIN is set (e.g. 'objectos.app').
- For any '*.OS_ROOT_DOMAIN' host that is not a reserved platform
subdomain (cloud/www/api/docs/admin/app) and not an infra path
(/_admin/*, /.well-known/*), looks up the env via envRegistry.
- If no env claims that hostname, returns 404
{ error: 'environment_not_found', hostname }.
- Falls through if registry is unavailable or for non-platform hosts
so custom domains and local dev keep working.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
0 commit comments