@webqit/webflo 0.20.21 → 0.20.23
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
|
@@ -3,7 +3,7 @@ import Url from 'url';
|
|
|
3
3
|
import Path from 'path';
|
|
4
4
|
import Http from 'http';
|
|
5
5
|
import Https from 'https';
|
|
6
|
-
import
|
|
6
|
+
import { WebSocketServer } from 'ws';
|
|
7
7
|
import Mime from 'mime-types';
|
|
8
8
|
import crypto from 'crypto';
|
|
9
9
|
import 'dotenv/config';
|
|
@@ -226,7 +226,7 @@ export class WebfloServer extends WebfloRuntime {
|
|
|
226
226
|
});
|
|
227
227
|
}
|
|
228
228
|
|
|
229
|
-
const wss = new
|
|
229
|
+
const wss = new WebSocketServer({ noServer: true });
|
|
230
230
|
|
|
231
231
|
process.on('uncaughtException', (err) => {
|
|
232
232
|
console.error('Uncaught Exception:', err);
|
|
@@ -505,7 +505,7 @@ export class WebfloServer extends WebfloRuntime {
|
|
|
505
505
|
const matchRoot = path => sparoots.reduce((prev, root) => prev || (`${path}/`.startsWith(`${root}/`) && root), null);
|
|
506
506
|
isSameSpaRedirect = matchRoot(destinationURL.pathname) === matchRoot(httpEvent.url.pathname);
|
|
507
507
|
}
|
|
508
|
-
if (xRedirectPolicy === 'manual' || (!isSameOriginRedirect && xRedirectPolicy === 'manual-when-cross-origin') || (!isSameSpaRedirect && xRedirectPolicy === 'manual-when-cross-spa')) {
|
|
508
|
+
if (xRedirectPolicy === 'manual' || (!isSameOriginRedirect && (xRedirectPolicy === 'manual-when-cross-origin' || xRedirectPolicy === 'manual-when-cross-spa')) || (!isSameSpaRedirect && xRedirectPolicy === 'manual-when-cross-spa')) {
|
|
509
509
|
response.headers.set('X-Redirect-Code', responseShim.prototype.status.get.call(response));
|
|
510
510
|
response.headers.set('Access-Control-Allow-Origin', '*');
|
|
511
511
|
response.headers.set('Cache-Control', 'no-store');
|