refactor(web): secure Pico websocket access behind launcher auth
- stop exposing the raw Pico token to the frontend - add /api/pico/info for non-secret Pico connection metadata - proxy /pico/ws through the launcher with same-origin and dashboard auth checks - inject the upstream Pico websocket protocol server-side - update frontend chat connection flow and Vite websocket proxy path - refresh related docs and tests
This commit is contained in:
1 parent
6126ede963
commit
4b76196e2c
14 files changed
+253
-171
No files matched your search
@@ -94,8 +94,6 @@ func (h *Handler) handleUpdateConfig(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
// Refresh cached pico token in case user changed it.
|
||||
refreshPicoToken(&cfg)
|
||||
h.applyRuntimeLogLevel()
|
||||
logger.Infof("configuration updated successfully")
|
||||
|
||||
@@ -193,8 +191,6 @@ func (h *Handler) handlePatchConfig(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
// Refresh cached pico token in case user changed it.
|
||||
refreshPicoToken(&newCfg)
|
||||
h.applyRuntimeLogLevel()
|
||||
logger.Infof("configuration updated successfully")
|
||||
|
||||
|
||||
Reference in new issue
Block a user