Skip to content
Console

Locked Ports: CORS, Sessions & Troubleshooting

Allow CORS preflight requests on a locked port, revoke browser sessions for one Pod or an entire workspace, review workspace role permissions, security limits, and troubleshoot errors.

Advanced controls, role permissions, security boundaries, and troubleshooting for Locked ports.

Web pages on other sites (Allow preflight)

Section titled “Web pages on other sites (Allow preflight)”

Sometimes a web page on another site needs to call a locked port from the browser. Before it sends the real request, the browser sends a small check first, called a CORS preflight. It is an OPTIONS request, and it carries no key. A locked port refuses it, so the page shows a CORS error.

Allow preflight lets that one check through. It is off by default, and you turn it on for each port.

RequestWith Allow preflight on
The browser’s preflight check (OPTIONS)Reaches your app without a key
The real request that follows (GET, POST and so on)Still needs an access key

Your app has to answer the preflight itself, with the CORS headers that say which sites may call it. Meshive doesn’t add them. If the page still gets a CORS error after you turn this on, check your app’s CORS settings.

Console. Open the Connect tab of the Pod. In the Access keys section, For web pages on another site has one row for each locked port, with a switch named Allow preflight. Turning it on asks first: Allow preflight requests on port 8000? — Preflight (OPTIONS) requests will reach your app without a key. A key you put in a web page is visible to everyone who opens that page — give that page its own key and roll it if it leaks. Choose Allow, or Cancel. Turning it off needs no confirmation. The setting is kept when you unlock the port and lock it again, and it does nothing while the port is unlocked.

CLI. meshive port-preflight <workspace> <pod> <port> on (asks first; add --yes to skip) or off. meshive pod lists the locked ports that let preflight through.

SDK and MCP. set_port_preflight(pod_name, workspace, port, allow) in the SDK. In the MCP server, set_port_preflight turns it on only after you say yes.

When a workspace member opens a locked port in a browser, the browser stays signed in to that port for 7 days. Sign out all ends those browser sessions for the Pod. It is in the Browser sessions section of the Connect tab, below Access keys.

Use it when a port was opened on a shared computer, or when a session may have leaked. The console asks first: Sign out all browser sessions? — Members who opened this Pod’s locked ports in a browser will have to enter again. Access keys keep working, and connections that are already open stay open. After you confirm, it shows Browser sessions signed out. This takes a few seconds to apply.

WhatResult
Browser sessions on every public port of this PodSigned out, within a few seconds
MembersGo through the console again the next time they open a port. Members who are still in the workspace get back in
Access keysNot affected. They keep working
Connections that are already openStay open until they close
Other PodsNot affected

Admins and billing members can use it. It can’t be undone, and running it again does no harm.

CLI. meshive pod-browser-sessions-revoke <workspace> <pod> (asks first). SDK and MCP. revoke_browser_sessions; in the MCP server it waits for your yes.

To sign out the browser sessions of every Pod in the workspace at once, use Sign out all in the Browser sessions section at the bottom of Settings → Team. The console asks first: Sign out all browser sessions in this workspace? — Members who opened a locked port of any Pod in this workspace in a browser will have to enter again. Access keys keep working, and connections that are already open stay open. It works like the Pod’s button, for all Pods of the workspace, and needs the same role. Removing a member from the workspace does this as well.

CLI. meshive workspace-browser-sessions-revoke <workspace> (asks first). SDK. revoke_workspace_browser_sessions(workspace). MCP. revoke_browser_sessions with all_pods=true and workspace (and no pod); it waits for your yes.

Actionadminbillingviewer
Open a locked port in the browserYesYesYes
See whether a port is locked, and list its access keysYesYesYes
Lock or unlock a portYesYesNo
Create, roll or revoke access keysYesYesNo
Turn Allow preflight on or offYesYesNo
Sign out all browser sessionsYesYesNo

A viewer sees the switches and buttons, but they are turned off.

You might seeIt meansDo
This port is lockedYou aren’t a member of the workspace that owns the PodAsk a workspace admin to invite you, then open the link again
A redirect (302) to the Meshive console when you open the URL in a browserThe lock is working: the port is checking that you are a workspace memberSign in to the console if asked; you are taken back to the page
A 401 or 302 response with the header X-Meshive-Lock-Denied: 1The lock refused the request before it reached your app. Your app didn’t send it, so don’t look for the cause in your appSend an access key, or open the URL in the browser as a workspace member
A browser error about CORS or a failed preflight when a page on another site calls the portA locked port refuses preflight requestsTurn on Allow preflight for the port, and check your app’s CORS settings. Or call the port from a server-side program with an access key, or unlock the port
401 with {"error":"unauthorized"} in a programThe port is locked and the request has no working access keySend an access key for this port, and check that it hasn’t expired or been revoked
401 on the background requests of an open pageYour browser sign-in to the port endedReload the page
The page loads inside another site but stays blank or shows an errorLocked ports can’t be shown in an iframe on another addressOpen the URL directly, or unlock the port
An orange N ports are unlocked notice on the Connect tabThose ports were made before locking existed, or by an older SDK, and nobody has chosen yetLock them with the switch in each row, or unlock one on purpose to keep it open
Locking… or Unlocking… stays for a long timeMeshive hasn’t confirmed the change yetWait a few minutes, then reload the page. Setting the switch again doesn’t make it faster. Until the row says Locked, treat the port as open
The switch is turned offYou are a viewer in this workspaceAsk an admin or billing member