@stemy/backend 5.0.1 → 5.0.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.
@@ -24,7 +24,7 @@ import cron from 'node-cron';
24
24
  import { socket } from 'zeromq';
25
25
  import { filter as filter$1, map, first, timeout } from 'rxjs/operators';
26
26
  import { createServer } from 'http';
27
- import express_, { static as static$1 } from 'express';
27
+ import express_ from 'express';
28
28
  import { Server } from 'socket.io';
29
29
  import { v4 } from 'uuid';
30
30
  import { createTransport } from 'nodemailer';
@@ -1776,7 +1776,16 @@ let BackendProvider = class BackendProvider {
1776
1776
  this.server = createServer(this.express);
1777
1777
  }
1778
1778
  get io() {
1779
- this.ioServer = this.ioServer || new Server(this.server, { path: "/socket" });
1779
+ this.ioServer = this.ioServer || new Server(this.server, {
1780
+ path: "/socket",
1781
+ cors: {
1782
+ credentials: true,
1783
+ exposedHeaders: ["content-disposition"],
1784
+ origin: (origin, callback) => {
1785
+ callback(null, true);
1786
+ }
1787
+ }
1788
+ });
1780
1789
  return this.ioServer;
1781
1790
  }
1782
1791
  };
@@ -3649,7 +3658,7 @@ async function setupStatic(rootFolder, container) {
3649
3658
  console.log(browserFolder, existsSync(browserFolder));
3650
3659
  if (existsSync(browserFolder)) {
3651
3660
  console.log(`public_html exists. setting up static files serving...`);
3652
- app.use(static$1(browserFolder, {
3661
+ app.use(express_.static(browserFolder, {
3653
3662
  maxAge: "1y"
3654
3663
  }));
3655
3664
  }