hof 22.9.0-fix-timeout-back-button-bug-beta.2 → 22.9.0-fix-timeout-back-button-bug-beta.4
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/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
## 2025-09-05, Version 22.9.0 (Stable), @Rhodine-orleans-lindsay
|
2
|
+
### Fixed
|
3
|
+
- Fixed bug where if text on session-timeout page was not being populated when the browser back button is used.
|
4
|
+
### Changed
|
5
|
+
- Session timeout page is now only available when there is a 'SESSION_TIMEOUT' error. If there is no such error and user navigates to '/session-timeout, the 'page does not exist' error is shown.
|
6
|
+
- 👊 Impact : '/session-timeout' step can be removed from the steps array if it has been set in the project's apps/*/index.js file. This routing is now handled in the hof framework.
|
7
|
+
|
1
8
|
## 2025-08-28, Version 22.8.5 (Stable), @Rhodine-orleans-lindsay
|
2
9
|
### Fixed
|
3
10
|
- Fixed bug where if `serviceName` had not been set in journey.json, the title tab on error pages did not default to the `header` in journey.json.
|
@@ -1,10 +1,7 @@
|
|
1
1
|
{{<error}}
|
2
|
-
{{$header}}
|
3
|
-
{{#t}}errors.session.title{{/t}}
|
4
|
-
{{/header}}
|
5
2
|
{{$content}}
|
6
|
-
<h1 class="govuk-heading-l">{{
|
7
|
-
<h2 class="govuk-heading-m">{{
|
3
|
+
<h1 class="govuk-heading-l">{{{content.title}}}</h1>
|
4
|
+
<h2 class="govuk-heading-m">{{{content.message}}}</h2>
|
8
5
|
<a href="{{startLink}}" class="govuk-button" role="button">{{#t}}buttons.start-again{{/t}}</a>
|
9
6
|
{{/content}}
|
10
7
|
{{/error}}
|
package/index.js
CHANGED
@@ -249,6 +249,19 @@ function bootstrap(options) {
|
|
249
249
|
return next();
|
250
250
|
});
|
251
251
|
}
|
252
|
+
|
253
|
+
app.get('/session-timeout', (req, res, next) => {
|
254
|
+
if (req.cookies['hof-wizard-sc'] && req.session.exists !== true) {
|
255
|
+
const err = new Error('Session expired');
|
256
|
+
err.code = 'SESSION_TIMEOUT';
|
257
|
+
return next(err);
|
258
|
+
}
|
259
|
+
const err = new Error('Not Found');
|
260
|
+
err.status = 404;
|
261
|
+
const locals = Object.assign({}, req.translate('errors'));
|
262
|
+
return res.status(404).render('404', locals['404']);
|
263
|
+
});
|
264
|
+
|
252
265
|
if (config.getAccessibility === true) {
|
253
266
|
deprecate(
|
254
267
|
'`getAccessibility` option is deprecated and may be removed in future versions.',
|
package/package.json
CHANGED
package/sandbox/.env
CHANGED