diff --git a/apps/api/src/index.ts b/apps/api/src/index.ts index a2b304b..799bdb6 100644 --- a/apps/api/src/index.ts +++ b/apps/api/src/index.ts @@ -10,7 +10,6 @@ import { accountRoutes } from './routes/account.js'; import { adminRoutes } from './routes/admin.js'; import { authRoutes } from './routes/auth.js'; import { billingRoutes } from './routes/billing.js'; -import { geoRoutes } from './routes/geo.js'; import { oauthRoutes } from './routes/oauth.js'; import { serverRoutes } from './routes/servers.js'; import { settingsRoutes } from './routes/settings.js'; @@ -82,7 +81,6 @@ await app.register(templateRoutes); await app.register(billingRoutes); await app.register(supportRoutes); await app.register(accountRoutes); -await app.register(geoRoutes); // Loud warning if STRIPE_PRICE_* env vars are set to product ids (prod_…) // instead of price ids (price_…). Stripe Checkout would silently 400 — easier diff --git a/apps/api/src/routes/geo.ts b/apps/api/src/routes/geo.ts deleted file mode 100644 index 463ef34..0000000 --- a/apps/api/src/routes/geo.ts +++ /dev/null @@ -1,33 +0,0 @@ -import type { FastifyInstance } from 'fastify'; - -/** - * GET /v1/geo/country → { country: 'CH' | 'DE' | ... | null } - * - * Returns the country derived from Cloudflare's `CF-IPCountry` request - * header, which CF adds to every request before it reaches our origin. - * The header is an ISO-3166 alpha-2 code (or 'XX' for unknown / Tor). - * - * Used by the login page to pre-select the dial-code in the country - * picker for SMS auth — visitors hitting the page from Germany see +49 - * already selected, etc. No IP is exposed to the client; only the - * country code. - * - * Returns `country: null` when: - * - Request is hitting the origin directly (dev / outside CF) - * - CF couldn't classify the IP ('XX' is normalised to null) - * - * Public route — no auth required. Reading a country code from a - * geo-IP header is not PII under GDPR / DSG. - */ -export async function geoRoutes(app: FastifyInstance) { - app.get('/v1/geo/country', async (req) => { - const raw = req.headers['cf-ipcountry']; - const header = Array.isArray(raw) ? raw[0] : raw; - if (!header) return { country: null }; - const code = header.toUpperCase(); - if (code === 'XX' || code === 'T1' || code.length !== 2) { - return { country: null }; - } - return { country: code }; - }); -} diff --git a/apps/web/app/(marketing)/page.tsx b/apps/web/app/(marketing)/page.tsx index c49e148..9c75b4d 100644 --- a/apps/web/app/(marketing)/page.tsx +++ b/apps/web/app/(marketing)/page.tsx @@ -1,4 +1,5 @@ import { HeroStepRotator } from '@/components/hero-step-rotator'; +import { HeroVideo } from '@/components/hero-video'; import { JsonLd } from '@/components/json-ld'; import { ParticleHero } from '@/components/particle-hero'; import { PulseLink } from '@/components/pulse'; @@ -174,19 +175,11 @@ export default function Landing() { className="relative w-full overflow-hidden border-b border-[--color-border] bg-black" >
- + {/* HeroVideo: native