osborn 0.9.2 → 0.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +8 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -300,6 +300,14 @@ function startApiServer(workingDir, port) {
|
|
|
300
300
|
// GET /sessions/export — stream a gzipped tar of ~/.claude/projects/ to the client
|
|
301
301
|
// Optional ?workDir= query param: if present, export only that project's slug folder.
|
|
302
302
|
if (req.method === 'GET' && url.pathname === '/sessions/export') {
|
|
303
|
+
if (syncToken) {
|
|
304
|
+
const authHeader = req.headers['authorization'] ?? '';
|
|
305
|
+
if (authHeader !== `Bearer ${syncToken}`) {
|
|
306
|
+
res.writeHead(401, { 'Content-Type': 'application/json' });
|
|
307
|
+
res.end(JSON.stringify({ error: 'Unauthorized' }));
|
|
308
|
+
return;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
303
311
|
const projectsDir = join(homedir(), '.claude', 'projects');
|
|
304
312
|
const workDir = url.searchParams.get('workDir');
|
|
305
313
|
if (workDir) {
|