Skip to content

Commit 4c85c21

Browse files
committed
fix: apply accept-language filtering only in ODB mode
1 parent dc1c7da commit 4c85c21

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/runtime/src/templates/getHandler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ const makeHandler = ({ conf, app, pageRoot, NextServer, staticManifest = [], mod
130130
const query = new URLSearchParams(event.queryStringParameters).toString()
131131
event.path = query ? `${event.path}?${query}` : event.path
132132

133-
if (event.headers['accept-language']) {
133+
if (event.headers['accept-language'] && mode === 'odb') {
134134
// keep just first language to match Netlify redirect limitation:
135135
// https://docs.netlify.com/routing/redirects/redirect-options/#redirect-by-country-or-language
136136
// > Language-based redirects always match against the first language reported by the browser in the Accept-Language header regardless of quality value weighting.

0 commit comments

Comments
 (0)