🤍 전 강의 25% 할인 중 🤍

2024년 상반기를 돌아보고 하반기에도 함께 성장해요!
인프런이 준비한 25% 할인 받으러 가기 >>

  • 카테고리

    질문 & 답변
  • 세부 분야

    프론트엔드

  • 해결 여부

    미해결

The Middleware "/src/middleware" must export a middleware or a default function

24.05.16 23:27 작성 24.05.17 11:44 수정 조회수 143

0

 

미들웨어 matcher에 추가한 페이지 home으로 replace 시에 이렇게 에러가 뜨는데 이유를 모르겠습니다 ㅠ

⨯ Error [ERR_HTTP_HEADERS_SENT]: Cannot append headers after they are sent to the client

at ServerResponse.appendHeader (node:_http_outgoing:689:11)

at AsyncLocalStorage.run (node:async_hooks:346:14)

 

import { auth as middleware } from "./auth";

export const config = {
  matcher: ["/compose/tweet", "/home", "/explore"],
};

 

답변 1

답변을 작성해보세요.

1

채널톡 아이콘