X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/2bfb0ef07fb64314f5c4ded641a8c280df9c1d0b..e1bc94ff7a1970c8bc669a034ffbf7d0165e510a:/cookbooks/overpass/templates/default/apache.erb diff --git a/cookbooks/overpass/templates/default/apache.erb b/cookbooks/overpass/templates/default/apache.erb index 47e136381..8ccd28a9d 100644 --- a/cookbooks/overpass/templates/default/apache.erb +++ b/cookbooks/overpass/templates/default/apache.erb @@ -29,9 +29,10 @@ DocumentRoot <%= @directory %> + RewriteEngine on RewriteMap totp prg:/srv/query.openstreetmap.org/apache/totp-filter RewriteCond ${totp:%{HTTP_COOKIE}} =0 - RewriteRule ^.*$ - [F,L] + RewriteRule ^/query-features - [F,L] <% if node[:overpass][:restricted_api] -%> ScriptAlias /query-features <%= @script_directory %>/interpreter @@ -39,6 +40,7 @@ # Remove Origin so Overpass does not interfere. RequestHeader unset Origin Header always add Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin + Header always add Access-Control-Allow-Credentials true <% else -%> ScriptAlias /api/ <%= @script_directory %>/ <% end -%>