Skip to content

Commit

Permalink
Update production environment variables and configure cookie settings
Browse files Browse the repository at this point in the history
  • Loading branch information
guillecro committed Dec 13, 2024
1 parent 0ea1176 commit 17eccc0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .env.production
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
NODE_ENV=production
NUXT_AUTH_BASE_URL=https://api.incidirparaexistir.democraciaenred.org/
NUXT_AUTH_BASE_URL=https://api.incidirparaexistir.democraciaenred.org/
NUXT_COOKIE_DOMAIN=.incidirparaexistir.democraciaenred.org
6 changes: 3 additions & 3 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default defineNuxtConfig({
},
// refer to https://auth.sidebase.io/guide/local/quick-start (0.9.4)
auth: {
baseURL: process.env.NUXT_AUTH_BASE_URL || 'http://caquita:3000/',
baseURL: process.env.NUXT_AUTH_BASE_URL || 'http://localhost:3000/',
provider: {
type: 'local',
endpoints: {
Expand All @@ -47,8 +47,8 @@ export default defineNuxtConfig({
headerName: 'Authorization',
maxAgeInSeconds: 172800, // 2days
sameSiteAttribute: 'lax',
cookieDomain: 'localhost', // check
secureCookieAttribute: false,
cookieDomain: process.env.NUXT_PUBLIC_API_URL || 'http://localhost:4000',
secureCookieAttribute: process.env.NODE_ENV === 'production' ? true : false,
httpOnlyCookieAttribute: false,
},
}
Expand Down

0 comments on commit 17eccc0

Please sign in to comment.