Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions neurow/integration_test/message_brokering_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ defmodule Neurow.IntegrationTest.MessageBrokeringTest do

assert_headers(headers, [
{"access-control-allow-origin", "*"},
{"cache-control", "no-cache"},
{"cache-control", "no-cache, no-store"},
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shall we do exactly as siiloSSE?

Suggested change
{"cache-control", "no-cache, no-store"},
{"cache-control", "no-cache, no-store, max-age=0, must-revalidate"},

{"connection", "close"},
{"content-type", "text/event-stream"},
{"transfer-encoding", "chunked"}
Expand Down Expand Up @@ -91,7 +91,7 @@ defmodule Neurow.IntegrationTest.MessageBrokeringTest do

assert_headers(headers, [
{"access-control-allow-origin", "*"},
{"cache-control", "no-cache"},
{"cache-control", "no-cache, no-store"},
{"connection", "close"},
{"content-type", "text/event-stream"},
{"transfer-encoding", "chunked"}
Expand Down
10 changes: 5 additions & 5 deletions neurow/integration_test/message_history_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ defmodule Neurow.IntegrationTest.MessageHistoryTest do

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

assert_headers(headers, [
{"access-control-allow-origin", "*"},
{"cache-control", "no-cache"},
{"cache-control", "no-cache, no-store"},
{"connection", "close"},
{"content-type", "text/event-stream"},
])
Expand Down Expand Up @@ -112,7 +112,7 @@ defmodule Neurow.IntegrationTest.MessageHistoryTest do

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

assert_headers(headers, [
{"access-control-allow-origin", "*"},
{"cache-control", "no-cache"},
{"cache-control", "no-cache, no-store"},
{"connection", "close"},
{"content-type", "text/event-stream"},
{"transfer-encoding", "chunked"}
Expand Down Expand Up @@ -171,7 +171,7 @@ defmodule Neurow.IntegrationTest.MessageHistoryTest do

assert_headers(headers, [
{"access-control-allow-origin", "*"},
{"cache-control", "no-cache"},
{"cache-control", "no-cache, no-store"},
{"connection", "close"},
{"content-type", "text/event-stream"},
{"transfer-encoding", "chunked"}
Expand Down
4 changes: 2 additions & 2 deletions neurow/integration_test/sse_livecycle_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ defmodule Neurow.IntegrationTest.SseLifecycleTest do

assert_headers(headers, [
{"access-control-allow-origin", "*"},
{"cache-control", "no-cache"},
{"cache-control", "no-cache, no-store"},
{"connection", "close"},
{"content-type", "text/event-stream"},
{"transfer-encoding", "chunked"}
Expand Down Expand Up @@ -59,7 +59,7 @@ defmodule Neurow.IntegrationTest.SseLifecycleTest do
headers,
[
{"access-control-allow-origin", "*"},
{"cache-control", "no-cache"},
{"cache-control", "no-cache, no-store"},
{"connection", "close"},
{"content-type", "text/event-stream"},
{"transfer-encoding", "chunked"},
Expand Down
2 changes: 1 addition & 1 deletion neurow/lib/neurow/public_api/endpoint.ex
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ defmodule Neurow.PublicApi.Endpoint do
conn
|> put_resp_header("content-type", "text/event-stream")
|> put_resp_header("access-control-allow-origin", "*")
|> put_resp_header("cache-control", "no-cache")
|> put_resp_header("cache-control", "no-cache, no-store")
|> put_resp_header("connection", "close")
|> put_resp_header("x-sse-timeout", to_string(timeout_ms))
|> put_resp_header("x-sse-keepalive", to_string(keep_alive_ms))
Expand Down