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.
| Request | With 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.
Browser sessions
Section titled “Browser sessions”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.
| What | Result |
|---|---|
| Browser sessions on every public port of this Pod | Signed out, within a few seconds |
| Members | Go through the console again the next time they open a port. Members who are still in the workspace get back in |
| Access keys | Not affected. They keep working |
| Connections that are already open | Stay open until they close |
| Other Pods | Not 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.
Every Pod in a workspace
Section titled “Every Pod in a workspace”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.
Who can change it
Section titled “Who can change it”| Action | admin | billing | viewer |
|---|---|---|---|
| Open a locked port in the browser | Yes | Yes | Yes |
| See whether a port is locked, and list its access keys | Yes | Yes | Yes |
| Lock or unlock a port | Yes | Yes | No |
| Create, roll or revoke access keys | Yes | Yes | No |
| Turn Allow preflight on or off | Yes | Yes | No |
| Sign out all browser sessions | Yes | Yes | No |
A viewer sees the switches and buttons, but they are turned off.
Limits to know about
Section titled “Limits to know about”Troubleshooting
Section titled “Troubleshooting”| You might see | It means | Do |
|---|---|---|
| This port is locked | You aren’t a member of the workspace that owns the Pod | Ask 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 browser | The lock is working: the port is checking that you are a workspace member | Sign 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: 1 | The lock refused the request before it reached your app. Your app didn’t send it, so don’t look for the cause in your app | Send 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 port | A locked port refuses preflight requests | Turn 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 program | The port is locked and the request has no working access key | Send an access key for this port, and check that it hasn’t expired or been revoked |
401 on the background requests of an open page | Your browser sign-in to the port ended | Reload the page |
| The page loads inside another site but stays blank or shows an error | Locked ports can’t be shown in an iframe on another address | Open the URL directly, or unlock the port |
| An orange N ports are unlocked notice on the Connect tab | Those ports were made before locking existed, or by an older SDK, and nobody has chosen yet | Lock them with the switch in each row, or unlock one on purpose to keep it open |
| Locking… or Unlocking… stays for a long time | Meshive hasn’t confirmed the change yet | Wait 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 off | You are a viewer in this workspace | Ask an admin or billing member |