Skip to content

Commit

Permalink
[Fix] Fix typo errors (#1703)
Browse files Browse the repository at this point in the history
[Senario]
Someone is now accessing the home page with a root path `/` ( Such as `https://nodejs.org/`):

The current is now guiding you to an English page.

Now I guide you to a page where you like according to your local system language from `accept-language`, which looks better and more friendly.

[Notices]
Please run `npm i` to install a 3-rd party `accept-language` before you run or deploy this.
  • Loading branch information
Maledong authored and fhemberger committed Jun 18, 2018
1 parent 312ea8b commit 2cfcb55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const layouts = chokidar.watch(path.join(__dirname, 'layouts'), opts)
const statics = chokidar.watch(path.join(__dirname, 'static'), opts)

// Redirect mechanism meant as a fix for languages where some pages
// has not translated yet, therefore redirect to the english equivalent,
// have not been translated yet, therefore redirect to the english equivalent,
// which isn't the correct language, but better than a 404-page
function redirectToEnglishUrl (req, res) {
return () => {
Expand Down

0 comments on commit 2cfcb55

Please sign in to comment.