You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Auto-generate and persist a secret to .env in dev mode.
281
281
// Set to false to disable.
282
282
autoGenerateSecret: true,
283
-
// Emit a per-request proxy page token into the SSR payload so
284
-
// client-driven proxy calls authenticate without pre-signed URLs.
285
-
// Set to false to keep the token out of the payload (e.g. for a
286
-
// stable response etag); client-side calls then need signed URLs.
287
-
pageToken: true,
288
283
}
289
284
}
290
285
})
291
286
```
292
287
288
+
To disable proxy security entirely, set `security` to `false`:
289
+
290
+
```ts [nuxt.config.ts]
291
+
exportdefaultdefineNuxtConfig({
292
+
scripts: {
293
+
// No secret is resolved or auto-generated, no page token is added to the
294
+
// SSR payload, and proxy endpoints pass requests through unverified.
295
+
security: false,
296
+
}
297
+
})
298
+
```
299
+
300
+
This is useful when you need a deterministic SSR payload (e.g. to compute a stable response `etag`), since the per-request page token otherwise changes the payload on every request. Proxy endpoints stay functional but unprotected against quota abuse.
301
+
293
302
#### Troubleshooting
294
303
295
304
**Signed URLs return 403 after deploy**
@@ -310,7 +319,7 @@ Page tokens are valid for 1 hour. If a user leaves a tab open longer than that,
310
319
311
320
**Proxy token changes the response payload on every request**
312
321
313
-
The module injects a per-request page token into the SSR payload, so the response hash differs each request. If you compute a stable `etag`, set `security.pageToken: false` to keep the token out of the payload. Client-side proxy calls will then need explicitly signed URLs.
322
+
The module injects a per-request page token into the SSR payload, so the response hash differs each request. If you compute a stable `etag`, set `security: false` to disable proxy security entirely. Proxy endpoints then pass requests through without signature verification, so only do this if quota abuse on those endpoints is not a concern.
0 commit comments