cognova 0.2.16 → 0.2.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cognova-prod",
3
- "version": "0.2.16",
3
+ "version": "0.2.17",
4
4
  "type": "module",
5
5
  "private": true,
6
6
  "dependencies": {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cognova",
3
3
  "type": "module",
4
- "version": "0.2.16",
4
+ "version": "0.2.17",
5
5
  "description": "Personal knowledge management system with Claude Code integration",
6
6
  "repository": {
7
7
  "type": "git",
@@ -3,6 +3,8 @@ import { drizzleAdapter } from 'better-auth/adapters/drizzle'
3
3
  import { getDb, schema } from '../db'
4
4
 
5
5
  export const auth = betterAuth({
6
+ // When behind a proxy, use the configured URL but BetterAuth will
7
+ // auto-detect the actual protocol from X-Forwarded-Proto header
6
8
  baseURL: process.env.BETTER_AUTH_URL || 'http://localhost:3000',
7
9
  database: drizzleAdapter(getDb(), {
8
10
  provider: 'pg',
@@ -21,8 +23,12 @@ export const auth = betterAuth({
21
23
  updateAge: 60 * 60 * 24 // Update session every 24 hours
22
24
  },
23
25
  advanced: {
24
- // For HTTP (non-HTTPS) access via IP/LAN, cookies must not require Secure flag
25
- useSecureCookies: process.env.BETTER_AUTH_URL?.startsWith('https://') ?? false
26
+ // Use secure cookies only when the configured URL uses HTTPS
27
+ useSecureCookies: process.env.BETTER_AUTH_URL?.startsWith('https://') ?? false,
28
+ // Trust X-Forwarded-* headers from reverse proxy
29
+ crossSubDomainCookies: {
30
+ enabled: true
31
+ }
26
32
  },
27
33
  trustedOrigins: process.env.ACCESS_MODE === 'any'
28
34
  ? (request?: Request) => {
@@ -1 +0,0 @@
1
- {"id":"bf0f9039-944a-4581-ac5f-cf72fe2c7dae","timestamp":1771875365591,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}