fix: update BASE_URL to INTERNAL_BASE_URL in revalidationHelper and remove unused BASE_URL from docker-compose

This commit is contained in:
Marco Pedone 2025-10-20 15:04:35 +02:00
parent 07767dd51b
commit 60e3f26fd8
3 changed files with 2 additions and 6 deletions

View file

@ -1,7 +1,5 @@
TODOS:
- Updated_at timestamp per appartamento se in backend ho modificato le foto, e uso quello per cache key
- Problema fetch revalidate url encoding
- Correggere link onboarding
- Indicare di dover modificare le info nel onboarding
- Modale annunci compatibili invece di collapsible
- Ordine annunci selezionati non deve variare

View file

@ -13,7 +13,6 @@ services:
BACKENDSERVER_URL: http://host.docker.internal:1323
TILES_URL: host.docker.internal:6379
KEYDB_URL: host.docker.internal:6380
BASE_URL: ${NEXT_PUBLIC_BASE_URL}
SENDGRID_API_KEY: ${SENDGRID_API_KEY}
STRIPE_SECRET_KEY: ${STRIPE_SECRET_KEY}
NEXT_PUBLIC_STRIPE_PUBLIC_KEY: ${NEXT_PUBLIC_STRIPE_PUBLIC_KEY}
@ -38,8 +37,7 @@ services:
PGPORT: ${PGPORT}
BACKENDSERVER_URL: http://host.docker.internal:1323
TILES_URL: host.docker.internal:6379
KEYDB_URL: host.docker.internal:6380
BASE_URL: ${NEXT_PUBLIC_BASE_URL}
KEYDB_URL: host.docker.internal:638
SENDGRID_API_KEY: ${SENDGRID_API_KEY}
STRIPE_SECRET_KEY: ${STRIPE_SECRET_KEY}
NEXT_PUBLIC_STRIPE_PUBLIC_KEY: ${NEXT_PUBLIC_STRIPE_PUBLIC_KEY}

View file

@ -3,7 +3,7 @@ import { env } from "~/env.mjs";
export const revalidate = async (path: string) => {
try {
const res = await fetch(
`${env.NEXT_PUBLIC_BASE_URL}/api/revalidation?secret=${env.REVALIDATION_SECRET}&path=${encodeURIComponent(path)}`,
`${env.INTERNAL_BASE_URL}/api/revalidation?secret=${env.REVALIDATION_SECRET}&path=${encodeURIComponent(path)}`,
{
method: "GET",
},