The setting and value for each dev server
| Dev server | Setting | qURL | ngrok | Cloudflare Quick Tunnel | Also needed through qURL | Version |
|---|---|---|---|---|---|---|
| Vite | server.allowedHosts in vite.config.js | .qurl.site | your-domain.ngrok-free.app | .trycloudflare.com | Nothing else | Vite 8.3.4 |
| Next.js | allowedDevOrigins in next.config.js | Your exact r_….qurl.site browser hostname | your-domain.ngrok-free.app | your-tunnel.trycloudflare.com (update and restart next dev each run) | Your exact r_….qurl.site host in experimental.serverActions.allowedOrigins, in development only, for Server Actions | Next.js 16.4.2 |
| Angular (ng serve) | allowedHosts under the serve target’s options in angular.json | .qurl.site | your-domain.ngrok-free.app | .trycloudflare.com | ng serve --host 127.0.0.1, and a restart after editing | Angular CLI 22.2.3 |
| Astro | server.allowedHosts in astro.config.mjs (Astro 5.4 and later) | .qurl.site | your-domain.ngrok-free.app | .trycloudflare.com | Nothing else | Astro 7.4.0 |
| SvelteKit | server.allowedHosts in vite.config.js | .qurl.site | your-domain.ngrok-free.app | .trycloudflare.com | Share vite dev: form actions under vite preview need an exact trusted origin | SvelteKit 3.1.0 |
| Nuxt | vite.server.allowedHosts in nuxt.config.ts | .qurl.site | your-domain.ngrok-free.app | .trycloudflare.com | Nothing else; avoid nuxt dev --public | Nuxt 4.6.2 |
| webpack-dev-server | devServer.allowedHosts in webpack.config.js | .qurl.site | your-domain.ngrok-free.app | .trycloudflare.com | client.webSocketURL: auto://0.0.0.0:0/ws for hot reload, as through any HTTPS tunnel | webpack-dev-server 6.1.0 and 5.2.7 |
| Django | ALLOWED_HOSTS in settings.py, with localhost kept | .qurl.site | your-domain.ngrok-free.app | .trycloudflare.com | The exact browser https origin in CSRF_TRUSTED_ORIGINS, for form posts; no origin wildcard | Django 6.1.2 |
| Rails | config.hosts in config/environments/development.rb | .qurl.site | your-domain.ngrok-free.app | .trycloudflare.com | A development-only exact browser-origin exception in ApplicationController, retaining the CSRF token check | Rails 8.1.4 |
Steps
Dev servers reject unknown tunnel hosts. Vite-based servers use allowedHosts; Next.js uses allowedDevOrigins; Django uses ALLOWED_HOSTS; Rails uses config.hosts. For qURL, allow .qurl.site; in Next.js allowedDevOrigins, use the exact browser hostname instead. For ngrok, use your exact dev domain, including ngrok-free.dev if assigned. With qURL, the app stays on your machine with no public URL, and each link opens once.
Recognise the error
Each dev server words it differently. Vite, and Angular, Astro, SvelteKit and Nuxt on top of it, answer “Blocked request. This host is not allowed”. Next.js logs “Blocked cross-origin request to Next.js dev resource”. webpack-dev-server answers “Invalid Host header”, Django “Invalid HTTP_HOST header” (DisallowedHost), and Rails “Blocked hosts”.
Allow the hostnames your framework requires
For host checks, a leading dot allows the domain and its subdomains, so the next link or tunnel run works too. Next.js checks browser origins instead: allow the exact browser hostname from the recipient in allowedDevOrigins, never a whole-domain wildcard. qURL and Cloudflare Quick Tunnels use a new subdomain each time; ngrok keeps one dev domain per account, so its exact name is enough. The table’s ngrok-free.app examples stand for your assigned hostname; use ngrok-free.dev if assigned. In Rails a leading dot covers only one more label, so .ts.net does not cover machine.tailnet.ts.net; use the tailnet’s own domain there.
Check form posts and hot reload through qURL
A qURL link’s browser origin (r_….qurl.site) differs from the host the app receives (c-….qurl.site). Servers that compare the two need one more setting, listed in the table: Next.js for Server Actions, Django and Rails for form posts. webpack-dev-server’s hot reload client needs client.webSocketURL behind any HTTPS tunnel.
What the recipient sees
With the domain allowed, the page loads through the link and hot reload connects.
Troubleshooting
| If you see | Do this |
|---|---|
| The setting is in place but the page is still blocked | The server did not reload its config. Vite, Astro, SvelteKit and Nuxt apply config edits on their own; ng serve, webpack-dev-server, Next.js and Rails need a restart. |
| The page loads, but form posts fail through qURL and not through ngrok | The server compares the browser’s origin with its own host, and under qURL those differ. Add the extra setting from the table’s qURL column. |
Show 6 more fixes
| If you see | Do this |
|---|---|
| qurl publish says the local app is not accepting TCP connections | Start the app first and check that curl works on the same address. qurl publish connects to localhost as 127.0.0.1, so if your app listens only on IPv6 (on macOS or Linux, lsof -iTCP -sTCP:LISTEN -nP shows [::1]), publish 'http://[::1]:PORT' instead, or start the dev server with --host 127.0.0.1 and publish that address. Neither requires listening on your LAN. Keep the quotes: zsh treats the brackets as a pattern. |
| The recipient sees “Access link invalid” | The link was already used or has expired. Run qurl share again and send the new link. |
| The recipient sees “Resource not found” | The resource was deleted after the link was made. Publish the app again, then run qurl share and send the new link. |
| publish rejects http://127.0.0.1 with “only HTTPS URLs are allowed”, asks you to log in, or prints no Access: line | Your qURL CLI is out of date. On macOS run brew update, then brew upgrade qurl; elsewhere install the latest release. After updating, qurl --version prints 3.4.1 or later, and every publish is private by default. |
| publish says this Linux session “can’t reach a systemd user manager” | You are in a container or sandbox without a user service manager. Run qurl publish with --foreground; sharing lasts as long as that process runs. Container and CI setup → |
| publish says “Quota Exceeded” with “protected resource limit reached”, or “Your qURL account has reached a plan limit” | You can see this without an account: a device with no account can keep up to 3 active resources, with links that last up to 24 hours. Run qurl list --status active, then qurl delete <CRID> for any you no longer need (it asks you to confirm; --yes skips that). qurl stop keeps the resource, so it does not free a slot. |
Frequently Asked Questions
Why do dev servers block unknown hosts?
To stop DNS rebinding, where a website you visit points its own name at your machine and reads your dev server. Vite added its check in 6.0.9, 5.4.12 and 4.5.6 (advisory GHSA-vg6x-rcgg-rjx6), and Rails added host authorization in 6.0 for the same reason.
Can I just turn the check off?
Every server has a switch: allowedHosts true or all, ALLOWED_HOSTS ["*"], clearing config.hosts, ng serve --allowed-hosts, nuxt dev --public. Each lets any website that rebinds a name reach your dev server. List the domains you use instead.
Which extra setting do form posts need through qURL?
Through qURL the browser is on r_….qurl.site while the app receives c-….qurl.site. Next.js Server Actions and Django and Rails form posts compare the two, so trust that exact browser address in development. The table lists the setting for each; update it when the browser hostname changes.
Who else can reach my app while the link is open?
Opening the link starts a session for that browser, which lasts 1 hour by default. After a browser opens it, another browser on the same public IP cannot use its access. A script or agent that opens the link without a browser is admitted by its network address instead, which other devices on that public IP share until the session ends. A link admits whoever opens it: the API’s IP and country rules do not apply to the signed links qurl share issues. Keep your app’s own sign-in for anything sensitive.