Skip to content

Commit c121848

Browse files
authored
add-no-store-instruction-header: Add no store instruction for cache header (#49)
1 parent 11afe90 commit c121848

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

neurow/integration_test/message_brokering_test.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ defmodule Neurow.IntegrationTest.MessageBrokeringTest do
3434

3535
assert_headers(headers, [
3636
{"access-control-allow-origin", "*"},
37-
{"cache-control", "no-cache"},
37+
{"cache-control", "no-cache, no-store"},
3838
{"connection", "close"},
3939
{"content-type", "text/event-stream"},
4040
{"transfer-encoding", "chunked"}
@@ -91,7 +91,7 @@ defmodule Neurow.IntegrationTest.MessageBrokeringTest do
9191

9292
assert_headers(headers, [
9393
{"access-control-allow-origin", "*"},
94-
{"cache-control", "no-cache"},
94+
{"cache-control", "no-cache, no-store"},
9595
{"connection", "close"},
9696
{"content-type", "text/event-stream"},
9797
{"transfer-encoding", "chunked"}

neurow/integration_test/message_history_test.exs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ defmodule Neurow.IntegrationTest.MessageHistoryTest do
4646

4747
assert_headers(headers, [
4848
{"access-control-allow-origin", "*"},
49-
{"cache-control", "no-cache"},
49+
{"cache-control", "no-cache, no-store"},
5050
{"connection", "close"},
5151
{"content-type", "text/event-stream"},
5252
{"transfer-encoding", "chunked"}
@@ -70,7 +70,7 @@ defmodule Neurow.IntegrationTest.MessageHistoryTest do
7070

7171
assert_headers(headers, [
7272
{"access-control-allow-origin", "*"},
73-
{"cache-control", "no-cache"},
73+
{"cache-control", "no-cache, no-store"},
7474
{"connection", "close"},
7575
{"content-type", "text/event-stream"},
7676
])
@@ -112,7 +112,7 @@ defmodule Neurow.IntegrationTest.MessageHistoryTest do
112112

113113
assert_headers(headers, [
114114
{"access-control-allow-origin", "*"},
115-
{"cache-control", "no-cache"},
115+
{"cache-control", "no-cache, no-store"},
116116
{"connection", "close"},
117117
{"content-type", "text/event-stream"},
118118
{"transfer-encoding", "chunked"}
@@ -139,7 +139,7 @@ defmodule Neurow.IntegrationTest.MessageHistoryTest do
139139

140140
assert_headers(headers, [
141141
{"access-control-allow-origin", "*"},
142-
{"cache-control", "no-cache"},
142+
{"cache-control", "no-cache, no-store"},
143143
{"connection", "close"},
144144
{"content-type", "text/event-stream"},
145145
{"transfer-encoding", "chunked"}
@@ -171,7 +171,7 @@ defmodule Neurow.IntegrationTest.MessageHistoryTest do
171171

172172
assert_headers(headers, [
173173
{"access-control-allow-origin", "*"},
174-
{"cache-control", "no-cache"},
174+
{"cache-control", "no-cache, no-store"},
175175
{"connection", "close"},
176176
{"content-type", "text/event-stream"},
177177
{"transfer-encoding", "chunked"}

neurow/integration_test/sse_livecycle_test.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ defmodule Neurow.IntegrationTest.SseLifecycleTest do
2525

2626
assert_headers(headers, [
2727
{"access-control-allow-origin", "*"},
28-
{"cache-control", "no-cache"},
28+
{"cache-control", "no-cache, no-store"},
2929
{"connection", "close"},
3030
{"content-type", "text/event-stream"},
3131
{"transfer-encoding", "chunked"}
@@ -59,7 +59,7 @@ defmodule Neurow.IntegrationTest.SseLifecycleTest do
5959
headers,
6060
[
6161
{"access-control-allow-origin", "*"},
62-
{"cache-control", "no-cache"},
62+
{"cache-control", "no-cache, no-store"},
6363
{"connection", "close"},
6464
{"content-type", "text/event-stream"},
6565
{"transfer-encoding", "chunked"},

neurow/lib/neurow/public_api/endpoint.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ defmodule Neurow.PublicApi.Endpoint do
4545
conn
4646
|> put_resp_header("content-type", "text/event-stream")
4747
|> put_resp_header("access-control-allow-origin", "*")
48-
|> put_resp_header("cache-control", "no-cache")
48+
|> put_resp_header("cache-control", "no-cache, no-store")
4949
|> put_resp_header("connection", "close")
5050
|> put_resp_header("x-sse-timeout", to_string(timeout_ms))
5151
|> put_resp_header("x-sse-keepalive", to_string(keep_alive_ms))

0 commit comments

Comments
 (0)