@webqit/webflo 0.8.73 → 0.8.76

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
@@ -12,7 +12,7 @@
12
12
  "vanila-javascript"
13
13
  ],
14
14
  "homepage": "https://webqit.io/tooling/webflo",
15
- "version": "0.8.73",
15
+ "version": "0.8.76",
16
16
  "license": "MIT",
17
17
  "repository": {
18
18
  "type": "git",
@@ -67,7 +67,6 @@ export default function(layout, params) {
67
67
  // Render
68
68
  // --------
69
69
  const data = response instanceof clientNavigationEvent.Response ? await response.data() : response;
70
- console.log('----------------data', data);
71
70
  await router.route('render', clientNavigationEvent, data, async function(event, data) {
72
71
  // --------
73
72
  // OOHTML would waiting for DOM-ready in order to be initialized
@@ -120,7 +120,8 @@ export default function(layout, params) {
120
120
 
121
121
  return defaultFetch(evt);
122
122
  };
123
- evt.respondWith(handleFetch(evt));
123
+ let response = handleFetch(evt);
124
+ evt.respondWith(response);
124
125
  });
125
126
 
126
127
  const defaultFetch = function(evt) {
@@ -229,7 +229,7 @@ export async function run(hostSetup, request, response, Ui, flags = {}, protocol
229
229
  };
230
230
  const serverNavigationEvent = new NavigationEvent(
231
231
  new NavigationEvent.Request(fullUrl, requestInit),
232
- _sessionFactory('_session', { duration: 60 * 60 }).get(),
232
+ _sessionFactory('_session', { duration: 60 * 60, activeDuration: 60 * 60 }).get(),
233
233
  _sessionFactory
234
234
  );
235
235
 
@@ -459,6 +459,13 @@ export async function run(hostSetup, request, response, Ui, flags = {}, protocol
459
459
  }
460
460
  });
461
461
 
462
+ // -------------------
463
+ // Important no-caching for non-"get" requests
464
+ // -------------------
465
+ if (httpMethodName !== 'get' && !response.getHeader('Cache-Control')) {
466
+ response.setHeader('Cache-Control', 'no-store');
467
+ }
468
+
462
469
  // -------------------
463
470
  // Send
464
471
  // -------------------
@@ -469,6 +476,7 @@ export async function run(hostSetup, request, response, Ui, flags = {}, protocol
469
476
  if (xRedirectPolicy === 'manual' || (!isSameOriginRedirect && xRedirectPolicy === 'manual-when-cross-origin') || (isSameOriginRedirect && xRedirectPolicy === 'manual-when-same-origin')) {
470
477
  response.statusCode = xRedirectCode;
471
478
  response.setHeader('X-Redirect-Code', $context.response.status);
479
+ response.setHeader('Cache-Control', 'no-store');
472
480
  } else {
473
481
  response.statusCode = $context.response.status;
474
482
  }