chaostreff.ch/static-src/.htaccess

13 lines
469 B
ApacheConf

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