TX028

Blocked dev server host

Console

Text.js error TX028: Blocked request. This host (…) is not allowed. Add it to `vite.server.allowedHosts` in text.config.ts.

Why this happens

The dev server only answers requests addressed to localhost or an IP address, which protects it from DNS rebinding. A request arrived with another Host header, typically through a tunnel or a LAN hostname.

How to fix it

Allow the host in text.config.ts:

text.config.tsts
import { defineConfig } from "@textjs/next";export default defineConfig({  vite: { server: { allowedHosts: ["my-laptop.local", ".ngrok.app"] } },});