Closed gbhrdt closed 7 years ago
From what I know, google doesn't really like you detecting the language anyways and prefers that you use a subdomain, or a directory in the url.
But I might be wrong. If you use this for an app, it's a different story, since google doesn't index it anyways. But in this case, there is no use for SSR, and so the cache is useless anyways :)
I know you're switching to react-intl, but it's not published right now. There is a bug with routes that have the same path but different languages (which are detected via cookie or header).
I temporarily fixed this for us by adding
req.language
to theplatform
variable here: https://github.com/ssrwpo/ssr/blob/0f82fed102f7267231c9e79c36b11e54c85505af/src/server/steps/cacheAnalysis.js#L11I think, the nicest solution would be adding the language to the cache key.