')
def spaceapi_proxy(schema, host, path=''):
url = urllib.parse.urlunsplit((schema, host, path, '', ''))
import logging
diff --git a/src/index.html b/src/index.html
index a6627f9..1bb6422 100644
--- a/src/index.html
+++ b/src/index.html
@@ -85,7 +85,7 @@
{{ space.open[lang] }} |
{% for key, url in space.contact.items() %}
- {{ contacts[key] }}
+ {{ contacts[key] }}
{% endfor %}
|
diff --git a/static-src/.htaccess b/static-src/.htaccess
new file mode 100644
index 0000000..92c0737
--- /dev/null
+++ b/static-src/.htaccess
@@ -0,0 +1,21 @@
+
+# Language-specific index based on Accept-Language header
+DirectoryIndex index.var index.html
+# Optional: Redirect to language specific subsite, rather than showing
+# language specific content at the root
+
+{% if htaccess_language_redirect %}
+{%- for language in languages %}
+Redirect /index.{{ language }}.html /{{ language }}/
+{%- endfor %}
+{%- endif %}
+
+{% if htaccess_spaceapi_proxy %}
+# SpaceAPI proxy service workaround for missing CORS headers
+RewriteEngine on
+{%- for space in hackerspaces %}
+{%- if 'spaceapi' in space %}
+RewriteRule ^/spaceapi-proxy{{ space.spaceapi }}$ {{ space.spaceapi.split('/', 2)[1] }}://{{ space.spaceapi.split('/', 2)[2] }} [P,L]
+{%- endif %}
+{%- endfor %}
+{%- endif %}