[nominatim-web] Use spaces for indentation
- From: Bartłomiej Piotrowski <bpiotrowski src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nominatim-web] Use spaces for indentation
- Date: Tue, 26 May 2020 16:21:39 +0000 (UTC)
commit 1d3874f8a8e6bd5ea1431e3cd6678774c364cc5e
Author: Bartłomiej Piotrowski <bpiotrowski gnome org>
Date: Tue May 26 18:21:03 2020 +0200
Use spaces for indentation
nginx.conf | 100 ++++++++++++++++++++++++++++++-------------------------------
1 file changed, 50 insertions(+), 50 deletions(-)
---
diff --git a/nginx.conf b/nginx.conf
index dbd5a09..dd3950b 100644
--- a/nginx.conf
+++ b/nginx.conf
@@ -30,7 +30,7 @@ http {
#gzip on;
upstream nominatim {
- server nominatim-int.gnome.org:80;
+ server nominatim-int.gnome.org:80;
}
upstream redis {
@@ -39,48 +39,48 @@ http {
}
server {
- listen 8080 default_server;
- listen [::]:8080 default_server;
- server_name _;
+ listen 8080 default_server;
+ listen [::]:8080 default_server;
+ server_name _;
- location / {
- return 200;
- access_log off;
- }
+ location / {
+ return 200;
+ access_log off;
+ }
set_by_lua_block $lang {
return ngx.req.get_uri_args()["accept-language"]
}
- location /redis-fetch {
- internal;
- set_md5 $redis_key $args;
- redis_pass redis;
- }
-
- location /redis-store {
- internal;
- set_md5 $key $arg_key;
- redis2_query set $key $echo_request_body;
- redis2_query expire $key 2592000;
- redis2_pass redis;
- }
-
- location = /search {
- set $cache_key search_$lang$arg_limit$arg_q$arg_country$arg_state$arg_city$arg_street;
- srcache_fetch GET /redis-fetch $cache_key;
- srcache_store PUT /redis-store key=$cache_key;
- srcache_store_no_cache on;
- srcache_response_cache_control off;
-
- proxy_pass http://nominatim/search;
- proxy_set_header Host "nominatim-int.gnome.org";
- add_header X-Cache-Status $srcache_fetch_status;
- }
-
- location = /reverse {
- set_by_lua_block $coord {
- local shorten = function (str)
+ location /redis-fetch {
+ internal;
+ set_md5 $redis_key $args;
+ redis_pass redis;
+ }
+
+ location /redis-store {
+ internal;
+ set_md5 $key $arg_key;
+ redis2_query set $key $echo_request_body;
+ redis2_query expire $key 2592000;
+ redis2_pass redis;
+ }
+
+ location = /search {
+ set $cache_key search_$lang$arg_limit$arg_q$arg_country$arg_state$arg_city$arg_street;
+ srcache_fetch GET /redis-fetch $cache_key;
+ srcache_store PUT /redis-store key=$cache_key;
+ srcache_store_no_cache on;
+ srcache_response_cache_control off;
+
+ proxy_pass http://nominatim/search;
+ proxy_set_header Host "nominatim-int.gnome.org";
+ add_header X-Cache-Status $srcache_fetch_status;
+ }
+
+ location = /reverse {
+ set_by_lua_block $coord {
+ local shorten = function (str)
if string.sub(str,1,1) == "-" then
return string.sub(str,1,9)
else
@@ -88,22 +88,22 @@ http {
end
end
- local args = ngx.req.get_uri_args()
- local lat = shorten(args["lat"])
- local lon = shorten(args["lon"])
+ local args = ngx.req.get_uri_args()
+ local lat = shorten(args["lat"])
+ local lon = shorten(args["lon"])
- return lat .. "x" .. lon
+ return lat .. "x" .. lon
}
- set $cache_key reverse_$lang$coord;
- srcache_fetch GET /redis-fetch $cache_key;
- srcache_store PUT /redis-store key=$cache_key;
- srcache_store_no_cache on;
- srcache_response_cache_control off;
+ set $cache_key reverse_$lang$coord;
+ srcache_fetch GET /redis-fetch $cache_key;
+ srcache_store PUT /redis-store key=$cache_key;
+ srcache_store_no_cache on;
+ srcache_response_cache_control off;
- proxy_pass http://nominatim/reverse;
- proxy_set_header Host "nominatim-int.gnome.org";
- add_header X-Cache-Status $srcache_fetch_status;
- }
+ proxy_pass http://nominatim/reverse;
+ proxy_set_header Host "nominatim-int.gnome.org";
+ add_header X-Cache-Status $srcache_fetch_status;
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]