-
-
Save skynet/9077f54d147193677314 to your computer and use it in GitHub Desktop.
Check the Accept-Language Header to emulate part of Apache's content negotiation features. This is based on http://stackoverflow.com/questions/3657614/how-to-rewrite-location-in-nginx-depending-on-the-client-browsers-language
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
map $http_accept_language $lang { | |
default en; | |
~de de; | |
~en en; | |
} | |
location /foo/bar/baz/lang.js { | |
try_files $uri.$lang $uri; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment