neoagent 2.1.18-beta.80 → 2.1.18-beta.82

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neoagent",
3
- "version": "2.1.18-beta.80",
3
+ "version": "2.1.18-beta.82",
4
4
  "description": "Proactive personal AI agent with no limits",
5
5
  "license": "MIT",
6
6
  "main": "server/index.js",
@@ -24,7 +24,7 @@ function isChromeExtensionOrigin(origin) {
24
24
 
25
25
  function isAllowedOrigin(origin, options = {}) {
26
26
  if (origin == null || origin === '') {
27
- return options.allowMissingOrigin === true;
27
+ return options.allowMissingOrigin !== false;
28
28
  }
29
29
  if (origin === 'null') return false;
30
30
  if (configuredOrigins.includes(origin)) return true;
@@ -148,6 +148,10 @@ function applyHttpMiddleware(app, { secureCookies, trustProxy, sessionMiddleware
148
148
  || path === '/api/browser-extension/pairing/request'
149
149
  || /^\/api\/browser-extension\/pairing\/[^/]+\/claim$/i.test(path);
150
150
  };
151
+ const isSocketIoCorsPath = (value = '') => {
152
+ const path = `${value}`.split('?')[0];
153
+ return path === '/socket.io/' || path === '/socket.io' || path.startsWith('/socket.io/');
154
+ };
151
155
  const requestPath = (req) => req.originalUrl || req.url || req.path || '';
152
156
  const applyOnlyToRecordingChunk = (handler) => (req, res, next) => (
153
157
  isRecordingChunkPath(requestPath(req)) ? handler(req, res, next) : next()
@@ -168,9 +172,10 @@ function applyHttpMiddleware(app, { secureCookies, trustProxy, sessionMiddleware
168
172
  callback(null, {
169
173
  origin(origin, originCallback) {
170
174
  const allowBrowserExtensionOrigin = isBrowserExtensionCorsPath(requestPath);
175
+ const allowSocketIoMissingOrigin = isSocketIoCorsPath(requestPath);
171
176
  return validateOrigin(origin, originCallback, {
172
177
  allowChromeExtension: allowBrowserExtensionOrigin,
173
- allowMissingOrigin: allowBrowserExtensionOrigin,
178
+ allowMissingOrigin: allowBrowserExtensionOrigin || allowSocketIoMissingOrigin,
174
179
  });
175
180
  },
176
181
  credentials: true,
@@ -37,6 +37,6 @@ _flutter.buildConfig = {"engineRevision":"59aa584fdf100e6c78c785d8a5b565d1de4b48
37
37
 
38
38
  _flutter.loader.load({
39
39
  serviceWorkerSettings: {
40
- serviceWorkerVersion: "3187592370" /* Flutter's service worker is deprecated and will be removed in a future Flutter release. */
40
+ serviceWorkerVersion: "2313546935" /* Flutter's service worker is deprecated and will be removed in a future Flutter release. */
41
41
  }
42
42
  });