Skip to content

Commit

Permalink
Merge pull request #30 from mbti-nf-team/feat/add-request-header
Browse files Browse the repository at this point in the history
  • Loading branch information
saseungmin authored Sep 24, 2023
2 parents 47b9f62 + a6f759c commit 025dab3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions @types/environment.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ namespace NodeJS {
NEXT_PUBLIC_API_HOST: string;
NEXT_PUBLIC_GA_MEASUREMENT_ID: string;
NEXT_PUBLIC_GOOGLE_TAG_MANAGER_ID: string;
API_HEADER_TOKEN: string;
}
}
5 changes: 4 additions & 1 deletion src/app/api/song/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ export async function GET(request: NextRequest) {
// NOTE - 정적인 데이터라 한시간 캐시
revalidate: ONE_HOUR,
},
headers: requestHeaders,
headers: {
...requestHeaders,
'nfteam-api-token': process.env.API_HEADER_TOKEN,
},
});

if (response.ok) {
Expand Down

0 comments on commit 025dab3

Please sign in to comment.