@tiflis-io/tiflis-code-tunnel 0.3.8 → 0.3.10

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.
Files changed (2) hide show
  1. package/dist/main.js +9 -3
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -46,6 +46,9 @@ function createApp(config2) {
46
46
  code
47
47
  });
48
48
  });
49
+ return app;
50
+ }
51
+ function setDefaultNotFoundHandler(app) {
49
52
  app.setNotFoundHandler((request, reply) => {
50
53
  request.log.warn({ url: request.url }, "Route not found");
51
54
  reply.status(404).send({
@@ -53,7 +56,6 @@ function createApp(config2) {
53
56
  code: "NOT_FOUND"
54
57
  });
55
58
  });
56
- return app;
57
59
  }
58
60
 
59
61
  // src/config/env.ts
@@ -543,13 +545,15 @@ var SECURITY_HEADERS = {
543
545
  // Content Security Policy
544
546
  "Content-Security-Policy": [
545
547
  "default-src 'self'",
546
- "script-src 'self'",
548
+ // Allow wasm-unsafe-eval for WebAssembly (audio processing libraries)
549
+ "script-src 'self' 'wasm-unsafe-eval'",
547
550
  "style-src 'self' 'unsafe-inline'",
548
551
  // unsafe-inline needed for Tailwind
549
552
  "img-src 'self' data: blob:",
550
553
  "font-src 'self'",
551
554
  "connect-src 'self' ws: wss:",
552
- "media-src 'self' blob:",
555
+ // Allow data: URIs for audio (TTS responses are base64-encoded)
556
+ "media-src 'self' blob: data:",
553
557
  "worker-src 'self' blob:",
554
558
  "frame-ancestors 'none'",
555
559
  "base-uri 'self'",
@@ -2406,6 +2410,8 @@ async function bootstrap() {
2406
2410
  webClientPath: env.WEB_CLIENT_PATH,
2407
2411
  logger
2408
2412
  });
2413
+ } else {
2414
+ setDefaultNotFoundHandler(app);
2409
2415
  }
2410
2416
  const wsServer = new WebSocketServerWrapper(
2411
2417
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiflis-io/tiflis-code-tunnel",
3
- "version": "0.3.8",
3
+ "version": "0.3.10",
4
4
  "description": "Tunnel server for tiflis-code - reverse proxy for workstation connections",
5
5
  "author": "Roman Barinov <rbarinov@gmail.com>",
6
6
  "license": "FSL-1.1-NC",