mirror of
https://github.com/djdevin/recflare.git
synced 2026-09-09 15:11:29 -07:00
www stuff
This commit is contained in:
@@ -6,6 +6,7 @@ import { withOnError } from '@repo/hono-helpers'
|
||||
|
||||
import { NotificationType } from '../../notify/src/notification-types'
|
||||
import { docsPage, fetchSpec } from './docs'
|
||||
import { privacyPage } from './privacy'
|
||||
import { accountsBase, apiBase, authBase, imgBase, notifyBase, postForm } from './upstream'
|
||||
|
||||
import type { Context } from 'hono'
|
||||
@@ -282,6 +283,12 @@ const app = new Hono<App>()
|
||||
return c.json({ success: true, sent: result.sent ?? 0 })
|
||||
})
|
||||
|
||||
// ---- Privacy policy -----------------------------------------------------
|
||||
// Server-rendered rather than a SPA route so the page has real text without
|
||||
// JavaScript: the Meta Horizon Store re-fetches this URL to check the policy is
|
||||
// still live, and an empty SPA shell can read as a broken link (see privacy.ts).
|
||||
.get('/privacy', (c) => c.html(privacyPage()))
|
||||
|
||||
// ---- Aggregated API docs ------------------------------------------------
|
||||
// `/docs` serves the self-hosted Scalar UI; `/docs/openapi/:service.json` proxies
|
||||
// each worker's spec same-origin (see docs.ts). The Scalar bundle itself
|
||||
|
||||
Reference in New Issue
Block a user