Skip to content

Commit

Permalink
Merge pull request #99 from an920107/frontend-v2
Browse files Browse the repository at this point in the history
fix: cookie out of range
  • Loading branch information
an920107 authored Nov 19, 2024
2 parents 8e348c8 + 8334821 commit f001202
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default function middleware(request: NextRequest) {
})
const response = handleI18nRouting(request);

if (response.headers.getSetCookie() !== null) {
if (response.headers.getSetCookie().length > 0) {
var setCookieHeader = response.headers.getSetCookie()[0].split(";");
setCookieHeader = setCookieHeader.map((cookie) => {
const [key, val] = cookie.trim().split("=");
Expand Down

0 comments on commit f001202

Please sign in to comment.