Skip to content

Commit

Permalink
fix: redirect issue tied to language header
Browse files Browse the repository at this point in the history
  • Loading branch information
shaunwarman committed May 14, 2020
1 parent 2e8b1cd commit 52eb771
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ class I18N {
// set the locale properly
i18n.setLocale([ctx.request, ctx.state], locale);
ctx.locale = ctx.request.locale;
ctx.set('Content-Language', ctx.locale);

// if the locale was not available then redirect user
if (locale !== ctx.state.locale) {
Expand Down

0 comments on commit 52eb771

Please sign in to comment.