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.
- package/.output/nitro.json +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/193167ad-c68a-48dc-8ed4-2336a5a7b3bc.json +1 -0
- package/.output/server/chunks/nitro/nitro.mjs +229 -223
- package/.output/server/package.json +1 -1
- package/package.json +1 -1
- package/server/utils/auth.ts +8 -2
- package/.output/public/_nuxt/builds/meta/bf0f9039-944a-4581-ac5f-cf72fe2c7dae.json +0 -1
package/package.json
CHANGED
package/server/utils/auth.ts
CHANGED
|
@@ -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
|
-
//
|
|
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":[]}
|