chaostreff.ch/static-src/.htaccess
s3lph 8d23141cf0
Some checks failed
/ build (push) Failing after 29s
/ upload (push) Failing after 48s
feat: add provisional spaceapi v15 hub endpoint
2024-05-25 14:24:37 +02:00

15 lines
519 B
ApacheConf

# 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 %}