# Language-specific index based on Accept-Language header DirectoryIndex index.var index.html RewriteEngine on RewriteRule ^/.well-known/spaceapi.json$ /spaceapi.json [L] {% if htaccess_spaceapi_proxy %} # SpaceAPI proxy service workaround for missing CORS headers {%- for space in hackerspaces %} {%- if 'spaceapi' in space %} {%- set proto, url = space.spaceapi.split('://', 1) %} RewriteRule ^{{ htaccess_spaceapi_proxy }}/{{ proto }}/{{ url }}$ {{ space.spaceapi }} [P,L] {%- endif %} {%- endfor %} {%- endif %}