From 2cfcb550f1aef8cc76af08fb8334c9918451297e Mon Sep 17 00:00:00 2001 From: Maledong <40081831+Maledong@users.noreply.github.com> Date: Mon, 18 Jun 2018 18:42:09 +0800 Subject: [PATCH] [Fix] Fix typo errors (#1703) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [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. --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index bfbe705ba44c..e8ca140916ad 100644 --- a/server.js +++ b/server.js @@ -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 () => {