[nominatim-web] Use set_by_lua_block to set $lang
- From: Bartłomiej Piotrowski <bpiotrowski src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nominatim-web] Use set_by_lua_block to set $lang
- Date: Tue, 26 May 2020 16:21:34 +0000 (UTC)
commit 3083c828038c1985acf713a6cc46d97c1a2ce30f
Author: Bartłomiej Piotrowski <bpiotrowski gnome org>
Date: Tue May 26 18:19:53 2020 +0200
Use set_by_lua_block to set $lang
nginx.conf | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/nginx.conf b/nginx.conf
index 5713d5a..dbd5a09 100644
--- a/nginx.conf
+++ b/nginx.conf
@@ -48,9 +48,9 @@ http {
access_log off;
}
- if ($args ~* "accept-language\=([a-zA-z-]{1,5})") {
- set $lang $1;
- }
+ set_by_lua_block $lang {
+ return ngx.req.get_uri_args()["accept-language"]
+ }
location /redis-fetch {
internal;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]