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
Copy file name to clipboardExpand all lines: packages/web/src/content/docs/config.mdx
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -132,7 +132,8 @@ You can configure server settings for the `opencode serve` and `opencode web` co
132
132
"server": {
133
133
"port": 4096,
134
134
"hostname": "0.0.0.0",
135
-
"mdns": true
135
+
"mdns": true,
136
+
"cors": ["http://localhost:5173"]
136
137
}
137
138
}
138
139
```
@@ -142,6 +143,7 @@ Available options:
142
143
-`port` - Port to listen on.
143
144
-`hostname` - Hostname to listen on. When `mdns` is enabled and no hostname is set, defaults to `0.0.0.0`.
144
145
-`mdns` - Enable mDNS service discovery. This allows other devices on the network to discover your OpenCode server.
146
+
-`cors` - Additional origins to allow for CORS when using the HTTP server from a browser-based client. Values must be full origins (scheme + host + optional port), eg `https://app.example.com`.
0 commit comments