diff --git a/README.md b/README.md index 1709ffdf..9050e71c 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ pnpm install ## University Web Revalidation -대학 지원 정보가 변경된 뒤 배포 없이 `university-web`의 정적 캐시를 무효화하려면 `POST /api/revalidate`를 호출한다. +대학 지원 정보가 변경된 뒤 배포 없이 `university-web`의 정적 캐시를 무효화하려면 `POST /university/revalidate`를 호출한다. ### Environment @@ -92,7 +92,7 @@ x-revalidate-secret: ${REVALIDATE_SECRET} ### Revalidate All University Pages ```bash -curl -X POST "https://www.solid-connection.com/api/revalidate" \ +curl -X POST "https://www.solid-connection.com/university/revalidate" \ -H "Authorization: Bearer ${REVALIDATE_SECRET}" \ -H "Content-Type: application/json" \ --data '{"scope":"university"}' @@ -101,7 +101,7 @@ curl -X POST "https://www.solid-connection.com/api/revalidate" \ ### Revalidate Home University Pages ```bash -curl -X POST "https://www.solid-connection.com/api/revalidate" \ +curl -X POST "https://www.solid-connection.com/university/revalidate" \ -H "Authorization: Bearer ${REVALIDATE_SECRET}" \ -H "Content-Type: application/json" \ --data '{"scope":"home-university","homeUniversity":"kyunghee"}' @@ -110,7 +110,7 @@ curl -X POST "https://www.solid-connection.com/api/revalidate" \ ### Revalidate One Path ```bash -curl -X POST "https://www.solid-connection.com/api/revalidate" \ +curl -X POST "https://www.solid-connection.com/university/revalidate" \ -H "Authorization: Bearer ${REVALIDATE_SECRET}" \ -H "Content-Type: application/json" \ --data '{"scope":"path","path":"/university/kyunghee"}' diff --git a/apps/university-web/src/app/university/revalidate/route.ts b/apps/university-web/src/app/university/revalidate/route.ts new file mode 100644 index 00000000..61e2d868 --- /dev/null +++ b/apps/university-web/src/app/university/revalidate/route.ts @@ -0,0 +1 @@ +export { POST } from "../../api/revalidate/route"; diff --git a/apps/web/next.config.mjs b/apps/web/next.config.mjs index 9f78ec71..a78cd47e 100644 --- a/apps/web/next.config.mjs +++ b/apps/web/next.config.mjs @@ -84,6 +84,10 @@ const nextConfig = { source: "/university/monitoring", destination: `${universityWebDomain}/university/monitoring`, }, + { + source: "/university/revalidate", + destination: `${universityWebDomain}/university/revalidate`, + }, { source: "/university", destination: `${universityWebDomain}/university`, diff --git a/docs/university-multizone-deployment.md b/docs/university-multizone-deployment.md index 67e181b6..06ee0511 100644 --- a/docs/university-multizone-deployment.md +++ b/docs/university-multizone-deployment.md @@ -24,6 +24,7 @@ ### `apps/university-web` - `/university` +- `/university/revalidate` - `/university/search` - `/university/:homeUniversity` - `/university/:homeUniversity/search`