X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/a19f9c4c8ce5cbc8b5b73d2d33de98bae686176b..57d7cd3ecda47266cc08d7e97b13e606405eb2a8:/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 47e136381..007e1c287 100644 --- a/cookbooks/overpass/templates/default/apache.erb +++ b/cookbooks/overpass/templates/default/apache.erb @@ -5,7 +5,7 @@ ServerAlias <%= node[:overpass][:fqdn] %> ServerAdmin webmaster@openstreetmap.org - CustomLog /var/log/apache2/<%= node[:overpass][:fqdn] %>-access.log combined + CustomLog /var/log/apache2/<%= node[:overpass][:fqdn] %>-access.log combined_extended ErrorLog /var/log/apache2/<%= node[:overpass][:fqdn] %>-error.log DocumentRoot <%= @directory %> @@ -20,7 +20,7 @@ ServerAlias <%= node[:overpass][:fqdn] %> ServerAdmin webmaster@openstreetmap.org - CustomLog /var/log/apache2/<%= node[:overpass][:fqdn] %>-access.log combined + CustomLog /var/log/apache2/<%= node[:overpass][:fqdn] %>-access.log combined_extended ErrorLog /var/log/apache2/<%= node[:overpass][:fqdn] %>-error.log SSLEngine on @@ -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 -%>