basic skew protection

This commit is contained in:
Dreamgineer
2025-12-18 11:52:02 +07:00 Unverified
parent 1dd347efbe
commit 17941d6e5e
3 changed files with 10 additions and 4 deletions
+3 -3
View File
@@ -51,6 +51,9 @@ COPY --from=deps /home/container/bun.lock ./
# App source
COPY --chown=1001 . .
# Deployment versioning
RUN bun -e "const id = Bun.randomUUIDv7(); Bun.write('.version', id); Bun.write('.env.deployment', 'NEXT_DEPLOYMENT_ID='+id)"
# Run patcher (background) + Next.js build (foreground), then kill patcher
RUN bun run build
@@ -74,7 +77,4 @@ COPY --from=builder /home/container/util ./util
COPY --from=builder /home/container/lib ./lib
COPY --from=builder /home/container/tsconfig.json ./tsconfig.json
# Deployment versioning
RUN bun -e "Bun.write('.version', Bun.randomUUIDv7())"
CMD ["bun", "start"]
+6 -1
View File
@@ -22,7 +22,12 @@ const nextConfig: NextConfig = withBundleAnalyzer({
},
],
},
// reactCompiler: true,
experimental: {
useSkewCookie: true,
authInterrupts: true,
},
deploymentId: process.env.NEXT_DEPLOYMENT_ID,
reactCompiler: true,
allowedDevOrigins: ["astral:3000", "dev3000.dgnr.us"],
// basePath: "/beta"
});
+1
View File
@@ -41,6 +41,7 @@ http {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# SSE SETUP
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_buffering off;