Unexpected redirection to Turkish-language page
belden opened this issue · comments
Belden Lyman commented
https://expressjs.com/en/api.html#res.render shows a link:
The target href is
https://expressjs.com/guide/using-template-engines.html
Clicking the link takes me to
https://expressjs.com/tr/guide/using-template-engines.html
🤔
The language change is surprising.
Additional information
It's not my browser; issuing a curl
shows the server is doing something unexpected
belden ~ $ curl -i 'https://expressjs.com/guide/using-template-engines.html'
HTTP/2 200
date: Mon, 13 Mar 2023 22:26:29 GMT
content-type: text/html; charset=utf-8
last-modified: Tue, 13 Sep 2022 19:58:46 GMT
vary: Accept-Encoding
access-control-allow-origin: *
expires: Mon, 13 Mar 2023 22:36:29 GMT
cache-control: max-age=600
x-proxy-cache: MISS
x-github-request-id: E9A2:3B9F:1BEBDDD:24AEA29:640FA315
cf-cache-status: DYNAMIC
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=IyzGa8Z1XdCdBRZc7ZnkwTIVd5gK44TtgMA52EoYr0sbU2HfnDf697gVblwURjDeDHV8tGj5G3ASeh7GBSVXhmWDaSEPIT1g6LZkHWJvr5HsiZZO0zBOrfsCW0qf1x8LNacVEbqOJTfhEhc%3D"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
server: cloudflare
cf-ray: 7a77b2e639a230be-SEA
<!DOCTYPE html>
<html lang="en-US">
<meta charset="utf-8">
<title>Redirecting…</title>
<link rel="canonical" href="http://expressjs.com/tr/guide/using-template-engines.html">
<script type="ed7f0efa2bde08e933e1579a-text/javascript">location="http://expressjs.com/tr/guide/using-template-engines.html"</script>
<meta http-equiv="refresh" content="0; url=http://expressjs.com/tr/guide/using-template-engines.html">
<meta name="robots" content="noindex">
<h1>Redirecting…</h1>
<a href="http://expressjs.com/tr/guide/using-template-engines.html">Click here if you are not redirected.</a>
<script src="/cdn-cgi/scripts/7d0fa10a/cloudflare-static/rocket-loader.min.js" data-cf-settings="ed7f0efa2bde08e933e1579a-|49" defer=""></script></html>
Shivam Shekhar Soy commented
Hi
I looked through the code and I think I can help with this issue. Can I take up this issue?
Shivam Shekhar Soy commented
I found that the page.lang
variable is missing in links leading to /guide/... in some markdown files. I have fixed it and made a pull request mentioning this issue.