govuk_personalisation 0.10.0 → 0.10.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d966869deca66c3fbea1730d7b2478ca77bc019d499b824269a9456eeffa82d9
4
- data.tar.gz: fc4735bde8c3077c1e8e2795e4deb496b2c7816bfe6006057b0c8e59ceb27196
3
+ metadata.gz: e6aba4a93adaa9cf995e9933fb12276d84e8d0e3011c17ec4689a63a5cf8f4a0
4
+ data.tar.gz: 97b6c20b940afef6fb31671187b619b89f58222922b7b2b8c9ae6233d2dcec0e
5
5
  SHA512:
6
- metadata.gz: 826c826f13b08be03d467655bab27bab323ec6b8823bdddc25b52f0d20906344ee4ece5c95a31bf7726e2aabdea0511b46934b5a37137d7e8788d496b570395f
7
- data.tar.gz: a74b510d5f549e3d0cc9df6b533763d5ac9a3c9211e424f49372b705acb9bb64229f35794f0aadaeee5492d8108040a5780acdc9a8e4d5c7bb4cf54a88b4b979
6
+ metadata.gz: f431ca7c35aca6f808d968d82eca6420ce0fab31c00766ec39226284790c7a46f8a49bf2d1dda60784853c85a8f836972d628b21ee7a77d213b6d5d0090a1715
7
+ data.tar.gz: 43eb1db4b1c9cbd2c7a44d8610dc22f33e0ddd37e844038d5b0ca32140cc9c42f0d9519be395d5f247df9963ce17736b106dddd05de0a8f34e1d30366561c3ec
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.10.1
2
+
3
+ - Make session-change events uncacheable ([#24](https://github.com/alphagov/govuk_personalisation/pull/24))
4
+
1
5
  # 0.10.0
2
6
  - Add `url_with_analytics` helper to allow apps to access the URL used for `redirect_with_analytics` ([#22](https://github.com/alphagov/govuk_personalisation/pull/22))
3
7
 
@@ -83,6 +83,8 @@ module GovukPersonalisation
83
83
  session_with_flash = GovukPersonalisation::Flash.encode_session(@account_session_header, @new_account_flash.keys)
84
84
 
85
85
  response.headers[ACCOUNT_SESSION_HEADER_NAME] = session_with_flash
86
+ response.headers["Cache-Control"] = "no-store"
87
+
86
88
  if Rails.env.development?
87
89
  cookies[ACCOUNT_SESSION_DEV_COOKIE_NAME] = {
88
90
  value: session_with_flash,
@@ -95,7 +97,10 @@ module GovukPersonalisation
95
97
  # header.
96
98
  def logout!
97
99
  response.headers[ACCOUNT_END_SESSION_HEADER_NAME] = "1"
100
+ response.headers["Cache-Control"] = "no-store"
101
+
98
102
  @account_session_header = nil
103
+
99
104
  if Rails.env.development?
100
105
  cookies[ACCOUNT_SESSION_DEV_COOKIE_NAME] = {
101
106
  value: "",
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GovukPersonalisation
4
- VERSION = "0.10.0"
4
+ VERSION = "0.10.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_personalisation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-10-26 00:00:00.000000000 Z
11
+ date: 2021-11-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: plek