X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/cf2a19d4f045022ce3d2ee494145d57e7a2fe462..df6b53394011fe72217ac3019daeef975430b2c8:/cookbooks/web/templates/default/apache.frontend.erb
diff --git a/cookbooks/web/templates/default/apache.frontend.erb b/cookbooks/web/templates/default/apache.frontend.erb
index f452b4fb3..c49bb91ab 100644
--- a/cookbooks/web/templates/default/apache.frontend.erb
+++ b/cookbooks/web/templates/default/apache.frontend.erb
@@ -78,7 +78,7 @@
# https://gist.github.com/Firefishy/86ed5b86991b225179b54bbafbcd769e
#
RewriteCond "%{QUERY_STRING}" "^q=abcde&t=20"
- RewriteRule "^/api/0\.6/notes/search$" - [R=204,L]
+ RewriteRule "^/api/0\.6/notes/search$" - [R=429,L]
#
# Force special MIME type for crossdomain.xml files
@@ -139,9 +139,7 @@
SetEnv SECRET_KEY_BASE <%= @secret_key_base %>
Alias /favicon.ico <%= node[:web][:base_directory] %>/rails/app/assets/favicons/favicon.ico
Alias /openlayers <%= node[:web][:base_directory] %>/static/openlayers
- Alias /stats /store/rails/stats
- Alias /user/image /store/rails/user/image
- Alias /attachments /store/rails/attachments
+ RedirectPermanent /stats https://planet.openstreetmap.org/statistics
#
# Pass authentication related headers to cgimap
@@ -200,7 +198,7 @@
- ServerName openstreetmap.org
+ ServerName osm.org
Header always set Cache-Control "max-age=31536000"
Header always set Expires "Tue, 19 Jan 2038 03:14:07 GMT"
@@ -210,12 +208,11 @@
RewriteRule ^/\.well-known/acme-challenge/(.*)$ http://acme.openstreetmap.org/.well-known/acme-challenge/$1 [R=permanent,L]
RewriteCond %{REQUEST_URI} !^/server-status$
- RewriteRule ^(.*)$ https://openstreetmap.org$1 [L,NE,R=permanent]
+ RewriteRule ^(.*)$ https://osm.org$1 [L,NE,R=permanent]
- ServerName www.openstreetmap.org
- ServerAlias *
+ ServerName www.osm.org
Header always set Cache-Control "max-age=31536000"
Header always set Expires "Tue, 19 Jan 2038 03:14:07 GMT"
@@ -224,15 +221,34 @@
RewriteRule ^/\.well-known/acme-challenge/(.*)$ http://acme.openstreetmap.org/.well-known/acme-challenge/$1 [R=permanent,L]
- # HSTS Preloading requires domain name match
- RewriteCond %{HTTP_HOST} =osm.org
RewriteCond %{REQUEST_URI} !^/server-status$
- RewriteRule ^(.*)$ https://osm.org$1 [L,NE,R=permanent]
+ RewriteRule ^(.*)$ https://www.osm.org$1 [L,NE,R=permanent]
+
+
+
+ ServerName openstreetmap.org
+
+ Header always set Cache-Control "max-age=31536000"
+ Header always set Expires "Tue, 19 Jan 2038 03:14:07 GMT"
+
+ RewriteEngine on
+
+ RewriteRule ^/\.well-known/acme-challenge/(.*)$ http://acme.openstreetmap.org/.well-known/acme-challenge/$1 [R=permanent,L]
- # HSTS Preloading requires domain match
- RewriteCond %{HTTP_HOST} =www.osm.org
RewriteCond %{REQUEST_URI} !^/server-status$
- RewriteRule ^(.*)$ https://www.osm.org$1 [L,NE,R=permanent]
+ RewriteRule ^(.*)$ https://openstreetmap.org$1 [L,NE,R=permanent]
+
+
+
+ ServerName www.openstreetmap.org
+ ServerAlias *
+
+ Header always set Cache-Control "max-age=31536000"
+ Header always set Expires "Tue, 19 Jan 2038 03:14:07 GMT"
+
+ RewriteEngine on
+
+ RewriteRule ^/\.well-known/acme-challenge/(.*)$ http://acme.openstreetmap.org/.well-known/acme-challenge/$1 [R=permanent,L]
RewriteCond %{REQUEST_URI} !^/server-status$
RewriteRule ^(.*)$ https://www.openstreetmap.org$1 [L,NE,R=permanent]
@@ -259,12 +275,12 @@
RewriteCond "%{REQUEST_FILENAME}\.gz" -s
RewriteRule "^(.*)\.(css|ico|js|json|svg|xml)$" "$1\.$2\.gz" [QSA]
- RewriteRule "\.css\.gz$" "-" [T=text/css,E=no-gzip:1]
- RewriteRule "\.ico\.gz$" "-" [T=image/vnd.microsoft.icon,E=no-gzip:1]
- RewriteRule "\.js\.gz$" "-" [T=text/javascript,E=no-gzip:1]
- RewriteRule "\.json\.gz$" "-" [T=application/json,E=no-gzip:1]
- RewriteRule "\.svg\.gz$" "-" [T=image/svg+xml,E=no-gzip:1]
- RewriteRule "\.xml\.gz$" "-" [T=application/xml,E=no-gzip:1]
+ RewriteRule "\.css\.gz$" "-" [T=text/css,E=no-gzip:1,E=no-brotli:1]
+ RewriteRule "\.ico\.gz$" "-" [T=image/vnd.microsoft.icon,E=no-gzip:1,E=no-brotli:1]
+ RewriteRule "\.js\.gz$" "-" [T=text/javascript,E=no-gzip:1,E=no-brotli:1]
+ RewriteRule "\.json\.gz$" "-" [T=application/json,E=no-gzip:1,E=no-brotli:1]
+ RewriteRule "\.svg\.gz$" "-" [T=image/svg+xml,E=no-gzip:1,E=no-brotli:1]
+ RewriteRule "\.xml\.gz$" "-" [T=application/xml,E=no-gzip:1,E=no-brotli:1]
Header append Content-Encoding gzip
@@ -283,15 +299,3 @@
Require all granted
-
-
- Require all granted
-
-
-
- Require all granted
-
-
-
- Require all granted
-