(#134) Added nginx-based auto-language negotiation for /. #135
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The Problem: Upon following the directions to the letter, when I
go to http://localhost:8080/ I get a 403: Forbidden nginx error screen.
The Reason: No language detection / negotiation is done, and / is empty.
The Solution: I added nginx-based language negotiation using the browser's
Accept-Language
header. If the user does not set a header (some search engines,curl, etc.), it will show the English page.
This only applies to the / route. It is assumed that any other route will be in
the desired language.
Now, http://localhost:8080/ will redirect to http://localhost:8080/en/.
IMPORTANT: You must manually remove your
minds_nginx
image and rebuild it.Fixes #134.