Fix: secure cookie disabled (Coolify handles HTTPS), fix admin password hash

This commit is contained in:
Vivek 2026-05-31 07:09:07 +00:00
parent 68afbb26b7
commit fa24c72d7f
2 changed files with 2 additions and 2 deletions

View file

@ -40,7 +40,7 @@ app.use(session({
secret: config.session.secret, secret: config.session.secret,
resave: false, resave: false,
saveUninitialized: false, saveUninitialized: false,
cookie: { secure: config.nodeEnv === 'production', maxAge: 24 * 60 * 60 * 1000 }, cookie: { secure: false, maxAge: 24 * 60 * 60 * 1000 },
})); }));
// Make user available to all views // Make user available to all views

View file

@ -113,7 +113,7 @@ CREATE POLICY "open" ON messages FOR ALL USING (true) WITH CHECK (true);
-- 8. SEED ADMIN USER (password: admin123) -- 8. SEED ADMIN USER (password: admin123)
INSERT INTO app_users (username, name, password_hash, role) VALUES INSERT INTO app_users (username, name, password_hash, role) VALUES
('admin', 'Admin', '$2a$10$8KzaNdKIMyOkASCBFOmKS.VbhOLar0sFAFJcXwauRfMRE8.xOP6Hy', 'admin') ('admin', 'Admin', '$2a$10$LAzb105XOhAqSXm1jMUQue0fp/lrUJBhsLgkobOQTeU.8Jh4rTaoq', 'admin')
ON CONFLICT (username) DO NOTHING; ON CONFLICT (username) DO NOTHING;
-- ============================================================ -- ============================================================