Skip to content

Commit

Permalink
fix: aws doesn't understand the 103 response status
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewPattell committed Jul 18, 2023
1 parent 11d8214 commit 9a9e7ea
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@lomray/react-head-manager": "^1.1.0",
"@lomray/react-mobx-manager": "^2.0.0-beta.19",
"@lomray/react-route-manager": "^1.0.0",
"@lomray/vite-ssr-boost": "^1.0.0-beta.19",
"@lomray/vite-ssr-boost": "^1.0.0-beta.21",
"axios": "^1.4.0",
"cookie-parser": "^1.4.6",
"isbot": "^3.6.12",
Expand Down
4 changes: 3 additions & 1 deletion src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default entryServer(App, routes, {
* 2. Create meta manager
* 3. Listen stream to add mobx suspense stores to output
*/
onRequest: async () => {
onRequest: async (req) => {
const storeManager = new Manager({
options: { shouldDisablePersist: true },
});
Expand All @@ -50,6 +50,8 @@ export default entryServer(App, routes, {
metaManager,
streamSuspense,
},
// disable 103 early hints for AWS ALB
hasEarlyHints: !req.get('User-Agent')?.includes('ELB-HealthChecker') ?? true,
};
},
/**
Expand Down

0 comments on commit 9a9e7ea

Please sign in to comment.