]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/overpass/templates/default/apache.erb
networking: add endpoint for my roaming device
[chef.git] / cookbooks / overpass / templates / default / apache.erb
index fbf82cf0479fe66d2a142c9aa726294974770206..47e1363813592d994d51f03fd2bf48a30e33ae65 100644 (file)
 
         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