Files
silly-rss/deploy/nginx-silly-rss.conf
T
paraandClaude Sonnet 5 ecf9baaa4d Add RSS feed generator for commune de Silly (actualites + agenda)
Scrapes the imio.smartweb JSON API used by www.silly.be (found via the
smartweb-news/smartweb-events web components in the raw HTML) instead of
needing a headless browser. Shells out to curl since Cloudflare silently
blocks Python's urllib/requests TLS fingerprint. Includes Yunohost cron
and nginx deployment snippets.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-25 21:36:39 +02:00

33 lines
1.0 KiB
Plaintext

# Extrait nginx pour servir les flux RSS generes par silly_rss.py.
#
# Sur Yunohost, chaque domaine a son propre dossier de fragments de conf,
# automatiquement inclus par le nginx gere par Yunohost :
# /etc/nginx/conf.d/<votre-domaine>.d/
#
# Installation :
# 1. Copier ce fichier vers :
# /etc/nginx/conf.d/<votre-domaine>.d/silly-rss.conf
# 2. Adapter le chemin "alias" ci-dessous si besoin.
# 3. Tester puis recharger nginx :
# sudo nginx -t && sudo systemctl reload nginx
#
# Les flux seront alors accessibles en :
# https://<votre-domaine>/silly-rss/actualites.xml
# https://<votre-domaine>/silly-rss/agenda.xml
location ^~ /silly-rss/ {
alias /var/www/silly-rss/;
autoindex off;
location ~ \.xml$ {
add_header Content-Type "application/rss+xml; charset=utf-8";
add_header Cache-Control "public, max-age=300";
}
# Bloque tout ce qui n'est pas un flux XML (script, log, etc.)
location ~ \.(py|log|pyc)$ {
deny all;
return 404;
}
}