sst 2.0.25 → 2.0.27
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.
- package/constructs/NextjsSite.js +3 -1
- package/package.json +1 -1
- package/project.js +4 -0
- package/runtime/server.js +1 -1
- package/sst.mjs +5 -1
package/constructs/NextjsSite.js
CHANGED
|
@@ -235,7 +235,9 @@ export class NextjsSite extends SsrSite {
|
|
|
235
235
|
// required by image optimization request
|
|
236
236
|
"accept",
|
|
237
237
|
// required by server request
|
|
238
|
-
"x-op-middleware-request-headers", "x-op-middleware-response-headers", "x-nextjs-data", "x-middleware-prefetch"
|
|
238
|
+
"x-op-middleware-request-headers", "x-op-middleware-response-headers", "x-nextjs-data", "x-middleware-prefetch",
|
|
239
|
+
// required by server request (in-place routing)
|
|
240
|
+
"rsc", "next-router-prefetch", "next-router-state-tree"),
|
|
239
241
|
cookieBehavior: cloudfront.CacheCookieBehavior.all(),
|
|
240
242
|
defaultTtl: CdkDuration.days(0),
|
|
241
243
|
maxTtl: CdkDuration.days(365),
|
package/package.json
CHANGED
package/project.js
CHANGED
|
@@ -85,6 +85,10 @@ export async function initProject(globals) {
|
|
|
85
85
|
path: path.join(project.paths.root, `.env.${project.config.stage}`),
|
|
86
86
|
override: true,
|
|
87
87
|
});
|
|
88
|
+
dotenv.config({
|
|
89
|
+
path: path.join(project.paths.root, `.env.${project.config.stage}.local`),
|
|
90
|
+
override: true,
|
|
91
|
+
});
|
|
88
92
|
Logger.debug("Config loaded", project);
|
|
89
93
|
}
|
|
90
94
|
async function usePersonalStage(out) {
|
package/runtime/server.js
CHANGED
|
@@ -71,7 +71,7 @@ export const useRuntimeServer = Context.memo(async () => {
|
|
|
71
71
|
Logger.debug("Worker", req.params.workerID, "sending next payload");
|
|
72
72
|
res.set({
|
|
73
73
|
"Lambda-Runtime-Aws-Request-Id": payload.context.awsRequestId,
|
|
74
|
-
"Lambda-Runtime-Deadline-Ms": payload.deadline,
|
|
74
|
+
"Lambda-Runtime-Deadline-Ms": Date.now() + payload.deadline,
|
|
75
75
|
"Lambda-Runtime-Invoked-Function-Arn": payload.context.invokedFunctionArn,
|
|
76
76
|
"Lambda-Runtime-Client-Context": JSON.stringify(payload.context.clientContext || {}),
|
|
77
77
|
...(payload.context.identity
|
package/sst.mjs
CHANGED
|
@@ -381,6 +381,10 @@ async function initProject(globals) {
|
|
|
381
381
|
path: path4.join(project.paths.root, `.env.${project.config.stage}`),
|
|
382
382
|
override: true
|
|
383
383
|
});
|
|
384
|
+
dotenv.config({
|
|
385
|
+
path: path4.join(project.paths.root, `.env.${project.config.stage}.local`),
|
|
386
|
+
override: true
|
|
387
|
+
});
|
|
384
388
|
Logger.debug("Config loaded", project);
|
|
385
389
|
}
|
|
386
390
|
async function usePersonalStage(out) {
|
|
@@ -2291,7 +2295,7 @@ var init_server2 = __esm({
|
|
|
2291
2295
|
Logger.debug("Worker", req.params.workerID, "sending next payload");
|
|
2292
2296
|
res.set({
|
|
2293
2297
|
"Lambda-Runtime-Aws-Request-Id": payload.context.awsRequestId,
|
|
2294
|
-
"Lambda-Runtime-Deadline-Ms": payload.deadline,
|
|
2298
|
+
"Lambda-Runtime-Deadline-Ms": Date.now() + payload.deadline,
|
|
2295
2299
|
"Lambda-Runtime-Invoked-Function-Arn": payload.context.invokedFunctionArn,
|
|
2296
2300
|
"Lambda-Runtime-Client-Context": JSON.stringify(
|
|
2297
2301
|
payload.context.clientContext || {}
|