ServerName lists{{ env_suffix }}.fedoraproject.org

Header always set Strict-Transport-Security "max-age=31536000"
Header always set X-Frame-Options "SAMEORIGIN"
Header always set X-Xss-Protection "1; mode=block"
Header always set X-Content-Type-Options "nosniff"
Header always set Referrer-Policy "same-origin"
RequestHeader set X-Forwarded-Proto 'https' env=HTTPS

Alias /favicon.ico {{ mailman_webui_basedir }}/static/favicon.ico
Alias /robots.txt  {{ mailman_webui_basedir }}/static/robots.txt
Alias /static      {{ mailman_webui_basedir }}/static

<Directory "{{ mailman_webui_basedir }}/static">
    Order deny,allow
    Allow from all
    Require all granted
</Directory>

ProxyPreserveHost On
ProxyRequests Off
ProxyAddHeaders Off

# Not redirecting/proxying static content (served locally)
ProxyPass /static !
ProxyPass /pipermail !
ProxyPass /apache-status !

# Proxying to gunicorn mailmanweb backend
ProxyPass / http://127.0.0.1:8000/
ProxyPassReverse / http://127.0.0.1:8000/

# Redirecting to hyperkitty if nothing is specified
RewriteEngine on
RewriteRule  ^/$    /archives [R,L]

# Old static archives

Alias /pipermail/ {{ mailman_webui_basedir }}/old-archives/pipermail/
<Directory {{ mailman_webui_basedir }}/old-archives/pipermail>
    Options FollowSymLinks
    AllowOverride None
    Require all granted
    AddDefaultCharset Off
</Directory>

RedirectMatch ^/pipermail[/]*$ /
RedirectMatch ^/mailman/listinfo/$ /
RedirectMatch ^/mailman$ /
