Skip to content

[Bug]: Server session cookies are insecure in production #133

@KGFCH2

Description

@KGFCH2

Problem

Session cookies are always configured with secure: false, even in production.

Current Behavior

A production deployment may send session cookies over insecure channels if the environment setting is not enforced.

Why This Improvement Is Needed

Secure cookie handling is required for production security and proper session behavior behind proxies.

Proposed Solution

Configure express-session to use secure: true in production, sameSite: lax, and proxy: true when behind a proxy.

Expected Outcome

Session cookies are only sent securely in production and are configured safely for deployment.

Additional Notes

This is a backend security hardening change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions