-
-
Notifications
You must be signed in to change notification settings - Fork 483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Server side rendered locale switching links will always start with http #123
Comments
A PR would be more then welcome :) |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
It does not seem a very easy fix as the method that determines |
Would it be possible to check the requested URL through |
Not if the hosted application is behind a reverse proxy. |
The logic is not that big (https://github.com/expressjs/express/blob/b8e50568af9c73ef1ade434e92c60d389868361d/lib/request.js#L306) but:
It feels kinda wrong to have to have all that in nuxt-i18n itself. It would be better if nuxt itself took care of those things. I wished nuxt used expressjs instead of connect... |
That's what I am thinking as well. |
Checking protocol can be easily done for this module: https://github.com/nuxt-community/is-https Which is already used by sitemap module |
@pi0 thanks. This is exactly what is needed. Including it in this package should be a no-brainer too... |
fix: better server side protocol detection (fixes #123)
* feat: redesign header * feat: improve search input and modal * feat: redesign aside category list item * fix: dark mode aside category item color * feat: redesign TOC * feat: redesign landing page * fix: TOC title and icon * feat: copy button in code blocks; closes nuxt-modules#117 * fix: dark mode TOC colors * feat: refactor logo component; add option for logo+text customization; closes nuxt-modules#110 * fix: redesign external resources * feat: redesign mobile navbar * feat: move mobile menu button to header * chore: cleanup * fix: coding session * feat: update typography * chore: fixes * fix: left align hamburger icon * fix: make body lock work on iOS * fix: try mobile safari aside fix * fix: missing Tailwind config * fix: try native CSS solution for mobile Safari aside issue * fix: try -webkit-fill-available for mobile Safari bug * fix: ... * chore: cleanup * feat: use warm gray pallete for dark mode * fix: add missing dependency * chore: update default color Co-authored-by: Sébastien Chopin <[email protected]>
Version
v5.2.1
Reproduction link
-
Steps to reproduce
What is expected ?
What is actually happening?
Additional comments?
In https://github.com/nuxt-community/nuxt-i18n/blob/e2aa687083873b6cb20b29beb044db8572e223cf/src/plugins/routing.js#L56
req.secure
is used, which is only defined in Express, but SSR context only provides Node'shttp.IncomingMessage
which does not contain such property, resulting in any of the links generated byswitchLocalePath
server side to start withhttp
.The text was updated successfully, but these errors were encountered: