Skip to content

Commit

Permalink
feat: 클라우드플레어 배포를 위한 경로 설정 (#1627)
Browse files Browse the repository at this point in the history
* feat: 클라우드플레어 배포를 위한 경로 설정

* feat: 커피챗 홈 및 수정 페이지 경로 추가

* chore: 코드 수정
  • Loading branch information
seojisoosoo authored Nov 1, 2024
1 parent 7030216 commit 584b735
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
10 changes: 10 additions & 0 deletions functions/coffeechat/[id].ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// /coffeechat/[id] 주소로 직접 접근 시 /coffeechat/[id].html 로 보내기
export const onRequest = async (context) => {
const { next, params } = context;

if (/\d+/.test(`${params.id}`)) {
return next('/coffeechat/[id]');
}

return next();
};
10 changes: 10 additions & 0 deletions functions/coffeechat/edit/[id].ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// /coffeechat/edit/[id] 주소로 직접 접근 시 /coffeechat/edit/[id].html 로 보내기
export const onRequest = async (context) => {
const { next, params } = context;

if (/\d+/.test(`${params.id}`)) {
return next('/coffeechat/edit/[id]');
}

return next();
};
6 changes: 6 additions & 0 deletions functions/coffeechat/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// /coffeechat 주소로 직접 접근 시 /coffeechat.html 로 보내기
export const onRequest = async (context) => {
const { next } = context;

return next('/coffeechat');
};

0 comments on commit 584b735

Please sign in to comment.