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
5 changes: 3 additions & 2 deletions apps/sim/lib/core/utils/sse.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/**
* Standard headers for Server-Sent Events responses
* Standard headers for Server-Sent Events responses. `no-transform` keeps Next's response
* compression and intermediaries from buffering the stream to compress it.
*/
export const SSE_HEADERS = {
'Content-Type': 'text/event-stream',
'Cache-Control': 'no-cache',
'Cache-Control': 'no-cache, no-transform',
Connection: 'keep-alive',
'X-Accel-Buffering': 'no',
} as const
Expand Down
5 changes: 1 addition & 4 deletions apps/sim/lib/mothership/request/session/sse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,4 @@ export function encodeSSEEnvelope(envelope: unknown): Uint8Array {
return encoder.encode(`data: ${JSON.stringify(presented)}\n\n`)
}

export const SSE_RESPONSE_HEADERS = {
...SSE_HEADERS,
'Content-Encoding': 'none',
} as const
export const SSE_RESPONSE_HEADERS = SSE_HEADERS
4 changes: 4 additions & 0 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
// invalidate the cache.
"cacheMaxAge": "7d",
"cacheMaxSize": "40GB",
// Bun applies `patches/*` to installed dependencies, but `bun.lock` records only each patch's
// path, so editing a patch leaves every task hash unchanged and replays a build of the
// unpatched dependency. Hash the patch contents into every task.
"globalDependencies": ["patches/**"],
"tasks": {
"ci:runtime": {
"dependsOn": ["^ci:runtime"],
Expand Down
Loading