X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/0f9b10e62eb9048bfcfa512500adb865ebc1ea79..4ed87e86c638523d093bc97b32715c4c6a41a70d:/cookbooks/overpass/templates/default/apache.erb?ds=sidebyside diff --git a/cookbooks/overpass/templates/default/apache.erb b/cookbooks/overpass/templates/default/apache.erb index fbf82cf04..47e136381 100644 --- a/cookbooks/overpass/templates/default/apache.erb +++ b/cookbooks/overpass/templates/default/apache.erb @@ -29,6 +29,10 @@ DocumentRoot <%= @directory %> + RewriteMap totp prg:/srv/query.openstreetmap.org/apache/totp-filter + RewriteCond ${totp:%{HTTP_COOKIE}} =0 + RewriteRule ^.*$ - [F,L] + <% if node[:overpass][:restricted_api] -%> ScriptAlias /query-features <%= @script_directory %>/interpreter SetEnvIf Origin "http.*(osm.org|openstreetmap.org).*" AccessControlAllowOrigin=$0