fix prod
This commit is contained in:
@@ -42,6 +42,7 @@ WORKDIR /app
|
|||||||
|
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
ENV NEXT_TELEMETRY_DISABLED=1
|
ENV NEXT_TELEMETRY_DISABLED=1
|
||||||
|
ENV TRUST_PROXY=1
|
||||||
|
|
||||||
# Copy necessary files from builder stage
|
# Copy necessary files from builder stage
|
||||||
COPY --from=builder /app/.next/standalone ./
|
COPY --from=builder /app/.next/standalone ./
|
||||||
|
|||||||
+2
-2
@@ -57,7 +57,7 @@ export async function createSession(payload: Omit<SessionPayload, 'expiresAt'>)
|
|||||||
|
|
||||||
cookieStore.set('session', session, {
|
cookieStore.set('session', session, {
|
||||||
httpOnly: true,
|
httpOnly: true,
|
||||||
secure: process.env.NODE_ENV === 'production',
|
secure: true, // Always secure in production
|
||||||
expires: expiresAt,
|
expires: expiresAt,
|
||||||
sameSite: 'lax',
|
sameSite: 'lax',
|
||||||
path: '/',
|
path: '/',
|
||||||
@@ -78,7 +78,7 @@ export async function updateSession() {
|
|||||||
|
|
||||||
cookieStore.set('session', newSession, {
|
cookieStore.set('session', newSession, {
|
||||||
httpOnly: true,
|
httpOnly: true,
|
||||||
secure: process.env.NODE_ENV === 'production',
|
secure: true, // Always secure in production
|
||||||
expires: expires,
|
expires: expires,
|
||||||
sameSite: 'lax',
|
sameSite: 'lax',
|
||||||
path: '/',
|
path: '/',
|
||||||
|
|||||||
Reference in New Issue
Block a user