- Introduced a new authentication system using session cookies for the web dashboard and API tokens for sync clients. - Replaced the old SERVER_PASSWORD scheme with a more secure API token mechanism. - Added routes for user setup, login, logout, and credential updates. - Implemented middleware to require session and API token for protected routes. - Updated web UI to handle authentication states and provide user feedback. - Enhanced error handling in API requests and responses. - Updated README to reflect new authentication flow and database requirements.
36 lines
1.2 KiB
Bash
36 lines
1.2 KiB
Bash
#################################################################
|
|
# Server
|
|
#################################################################
|
|
PORT=3000
|
|
NODE_ENV=production
|
|
|
|
# Set to "true" once served over HTTPS - marks the admin session cookie Secure.
|
|
COOKIE_SECURE=false
|
|
|
|
#################################################################
|
|
# PostgreSQL configuration
|
|
# You can either provide a single DATABASE_URL or the PG* variables below
|
|
#################################################################
|
|
# Example URL: postgres://user:password@localhost:5432/collabtable
|
|
DATABASE_URL=
|
|
|
|
# If DATABASE_URL is not set, these individual settings are used:
|
|
PGHOST=localhost
|
|
PGPORT=5432
|
|
PGUSER=postgres
|
|
PGPASSWORD=
|
|
PGDATABASE=collabtable
|
|
|
|
#################################################################
|
|
# Startup resilience and sync tuning
|
|
#################################################################
|
|
# DB init retry interval in milliseconds (default: 5000)
|
|
DB_INIT_RETRY_INTERVAL_MS=5000
|
|
|
|
# Max DB init retry attempts. 0 means retry forever (default: 0)
|
|
DB_INIT_RETRY_MAX_ATTEMPTS=0
|
|
|
|
# Allow at most this much client clock skew into sync timestamps (default: 0)
|
|
# Keep this at 0 to prevent future-dated rows from being re-sent in hot loops.
|
|
SYNC_MAX_FUTURE_SKEW_MS=0
|