922d4ae4c6b1
Browse files- app.py +9 -0
- web/legal/privacy.html +10 -4
app.py
CHANGED
|
@@ -273,9 +273,18 @@ WEB = config.WEB_DIR
|
|
| 273 |
|
| 274 |
# Ogni avvio ha la sua versione: dopo un aggiornamento il browser non riusa script e stili vecchi.
|
| 275 |
_VERSION = str(int(time.time()))
|
|
|
|
| 276 |
_INDEX = re.sub(r'((?:src|href)="/web/[\w/.-]+\.(?:js|css))"', rf'\1?v={_VERSION}"', (WEB / "index.html").read_text(encoding="utf-8"))
|
| 277 |
|
| 278 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 279 |
@app.middleware("http")
|
| 280 |
async def _fresh_assets(request: Request, call_next: Any) -> Response:
|
| 281 |
response = await call_next(request)
|
|
|
|
| 273 |
|
| 274 |
# Ogni avvio ha la sua versione: dopo un aggiornamento il browser non riusa script e stili vecchi.
|
| 275 |
_VERSION = str(int(time.time()))
|
| 276 |
+
_BEACON = os.environ.get("PIXRICK_CF_BEACON", "").strip()
|
| 277 |
_INDEX = re.sub(r'((?:src|href)="/web/[\w/.-]+\.(?:js|css))"', rf'\1?v={_VERSION}"', (WEB / "index.html").read_text(encoding="utf-8"))
|
| 278 |
|
| 279 |
|
| 280 |
+
if re.fullmatch(r"[0-9a-f]{32}", _BEACON):
|
| 281 |
+
# Cloudflare Web Analytics: conta le visite senza cookie e senza dati personali.
|
| 282 |
+
_INDEX = _INDEX.replace(
|
| 283 |
+
"</body>",
|
| 284 |
+
f'<script defer src="https://static.cloudflareinsights.com/beacon.min.js" data-cf-beacon=\'{{"token": "{_BEACON}"}}\'></script>\n</body>',
|
| 285 |
+
)
|
| 286 |
+
|
| 287 |
+
|
| 288 |
@app.middleware("http")
|
| 289 |
async def _fresh_assets(request: Request, call_next: Any) -> Response:
|
| 290 |
response = await call_next(request)
|
web/legal/privacy.html
CHANGED
|
@@ -21,9 +21,9 @@
|
|
| 21 |
|
| 22 |
<section lang="it">
|
| 23 |
<h1>Informativa privacy</h1>
|
| 24 |
-
<p class="updated">Aggiornata il
|
| 25 |
|
| 26 |
-
<p>PixRick è un progetto personale e gratuito. È costruito per sapere di te il meno possibile: niente pubblicità, niente
|
| 27 |
|
| 28 |
<h2>Chi è il titolare</h2>
|
| 29 |
<p>{{titolare}}. Per qualsiasi richiesta: {{contatto}}.</p>
|
|
@@ -38,6 +38,9 @@
|
|
| 38 |
<h2>Cosa resta sul tuo dispositivo</h2>
|
| 39 |
<p>Galleria, bozze, stili che crei e preferenze sono salvati nel tuo browser (IndexedDB e localStorage). Non vengono inviati a nessuno. Puoi cancellarli quando vuoi dalla galleria o svuotando i dati del sito dalle impostazioni del browser. Le bozze non salvate si cancellano da sole dopo 24 ore.</p>
|
| 40 |
|
|
|
|
|
|
|
|
|
|
| 41 |
<h2>Accesso con Hugging Face (facoltativo)</h2>
|
| 42 |
<p>Puoi usare PixRick senza account. Se scegli di accedere con Hugging Face, Hugging Face ci comunica il tuo nome utente, il nome visualizzato e l'immagine del profilo, e rilascia un token di accesso valido al massimo 7 giorni. Token e profilo restano solo nel tuo browser: servono a mostrarti chi ha fatto l'accesso e a far contare la GPU sulla tua quota personale di Hugging Face. Il server di PixRick non li conserva. Con "Esci" li cancelli dal browser; puoi revocare l'accesso anche dalle impostazioni del tuo account Hugging Face.</p>
|
| 43 |
|
|
@@ -57,9 +60,9 @@
|
|
| 57 |
|
| 58 |
<section lang="en">
|
| 59 |
<h1>Privacy notice</h1>
|
| 60 |
-
<p class="updated">Updated
|
| 61 |
|
| 62 |
-
<p>PixRick is a free personal project. It is built to know as little about you as possible: no ads, no
|
| 63 |
|
| 64 |
<h2>Who is responsible</h2>
|
| 65 |
<p>{{titolare}}. For any request: {{contatto}}.</p>
|
|
@@ -74,6 +77,9 @@
|
|
| 74 |
<h2>What stays on your device</h2>
|
| 75 |
<p>Gallery, drafts, the styles you create and your preferences are saved in your browser (IndexedDB and localStorage). They are not sent to anyone. You can delete them at any time from the gallery or by clearing this site's data in your browser settings. Unsaved drafts delete themselves after 24 hours.</p>
|
| 76 |
|
|
|
|
|
|
|
|
|
|
| 77 |
<h2>Signing in with Hugging Face (optional)</h2>
|
| 78 |
<p>You can use PixRick without an account. If you choose to sign in with Hugging Face, Hugging Face shares your username, display name and profile picture with us, and issues an access token valid for at most 7 days. The token and profile stay only in your browser: they show who is signed in and make GPU use count against your personal Hugging Face quota. PixRick's server does not keep them. "Sign out" deletes them from your browser; you can also revoke access from your Hugging Face account settings.</p>
|
| 79 |
|
|
|
|
| 21 |
|
| 22 |
<section lang="it">
|
| 23 |
<h1>Informativa privacy</h1>
|
| 24 |
+
<p class="updated">Aggiornata il 20 novembre 2026</p>
|
| 25 |
|
| 26 |
+
<p>PixRick è un progetto personale e gratuito. È costruito per sapere di te il meno possibile: niente pubblicità, niente cookie di tracciamento, niente profilazione.</p>
|
| 27 |
|
| 28 |
<h2>Chi è il titolare</h2>
|
| 29 |
<p>{{titolare}}. Per qualsiasi richiesta: {{contatto}}.</p>
|
|
|
|
| 38 |
<h2>Cosa resta sul tuo dispositivo</h2>
|
| 39 |
<p>Galleria, bozze, stili che crei e preferenze sono salvati nel tuo browser (IndexedDB e localStorage). Non vengono inviati a nessuno. Puoi cancellarli quando vuoi dalla galleria o svuotando i dati del sito dalle impostazioni del browser. Le bozze non salvate si cancellano da sole dopo 24 ore.</p>
|
| 40 |
|
| 41 |
+
<h2>Statistiche delle visite</h2>
|
| 42 |
+
<p>Per sapere quante persone visitano PixRick usiamo Cloudflare Web Analytics (Cloudflare, Inc.). Non usa cookie, non salva nulla sul tuo dispositivo e non ti segue su altri siti: conta le visite in forma aggregata (pagina, paese, tipo di dispositivo e browser, sito di provenienza). Non riceve prompt né immagini. Dettagli nella <a href="https://www.cloudflare.com/privacypolicy/" target="_blank" rel="noopener">privacy policy di Cloudflare</a>.</p>
|
| 43 |
+
|
| 44 |
<h2>Accesso con Hugging Face (facoltativo)</h2>
|
| 45 |
<p>Puoi usare PixRick senza account. Se scegli di accedere con Hugging Face, Hugging Face ci comunica il tuo nome utente, il nome visualizzato e l'immagine del profilo, e rilascia un token di accesso valido al massimo 7 giorni. Token e profilo restano solo nel tuo browser: servono a mostrarti chi ha fatto l'accesso e a far contare la GPU sulla tua quota personale di Hugging Face. Il server di PixRick non li conserva. Con "Esci" li cancelli dal browser; puoi revocare l'accesso anche dalle impostazioni del tuo account Hugging Face.</p>
|
| 46 |
|
|
|
|
| 60 |
|
| 61 |
<section lang="en">
|
| 62 |
<h1>Privacy notice</h1>
|
| 63 |
+
<p class="updated">Updated 20 November 2026</p>
|
| 64 |
|
| 65 |
+
<p>PixRick is a free personal project. It is built to know as little about you as possible: no ads, no tracking cookies, no profiling.</p>
|
| 66 |
|
| 67 |
<h2>Who is responsible</h2>
|
| 68 |
<p>{{titolare}}. For any request: {{contatto}}.</p>
|
|
|
|
| 77 |
<h2>What stays on your device</h2>
|
| 78 |
<p>Gallery, drafts, the styles you create and your preferences are saved in your browser (IndexedDB and localStorage). They are not sent to anyone. You can delete them at any time from the gallery or by clearing this site's data in your browser settings. Unsaved drafts delete themselves after 24 hours.</p>
|
| 79 |
|
| 80 |
+
<h2>Visit statistics</h2>
|
| 81 |
+
<p>To know how many people visit PixRick we use Cloudflare Web Analytics (Cloudflare, Inc.). It uses no cookies, stores nothing on your device and does not track you across other sites: it counts visits in aggregate (page, country, device and browser type, referring site). It never receives prompts or images. Details in <a href="https://www.cloudflare.com/privacypolicy/" target="_blank" rel="noopener">Cloudflare's privacy policy</a>.</p>
|
| 82 |
+
|
| 83 |
<h2>Signing in with Hugging Face (optional)</h2>
|
| 84 |
<p>You can use PixRick without an account. If you choose to sign in with Hugging Face, Hugging Face shares your username, display name and profile picture with us, and issues an access token valid for at most 7 days. The token and profile stay only in your browser: they show who is signed in and make GPU use count against your personal Hugging Face quota. PixRick's server does not keep them. "Sign out" deletes them from your browser; you can also revoke access from your Hugging Face account settings.</p>
|
| 85 |
|