Skip to content

fix: warn when --lan and --wildcard are used together#237

Open
octo-patch wants to merge 1 commit intovercel-labs:mainfrom
octo-patch:fix/issue-215-warn-lan-wildcard-incompatible
Open

fix: warn when --lan and --wildcard are used together#237
octo-patch wants to merge 1 commit intovercel-labs:mainfrom
octo-patch:fix/issue-215-warn-lan-wildcard-incompatible

Conversation

@octo-patch
Copy link
Copy Markdown

Fixes #215

Problem

--lan mode uses mDNS (.local domains) to make services accessible to other devices on the local network. However, mDNS does not support wildcard records — only explicitly registered route hostnames are resolvable on other devices.

When a user passes both --lan and --wildcard to portless proxy start, the wildcard subdomain fallback silently has no effect for LAN clients (other devices can't resolve the wildcard subdomains via mDNS). There was no indication of this limitation.

Solution

  • Added a runtime warning when both --lan and --wildcard are used together:
    Warning: --wildcard has no effect in LAN mode. mDNS does not support wildcard records,
    so only explicitly registered routes resolve on other devices.
    
  • Updated the --wildcard flag description in the run command help to note "(local only, not LAN)"
  • Updated PORTLESS_WILDCARD env var description similarly
  • Updated the proxy start help to note LAN mode incompatibility with --wildcard
  • Added a test for the warning

Testing

Added a new test warns when --lan and --wildcard are both provided following the same pattern as the existing warns when --lan and --tld are both provided test. All 402 tests pass.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 19, 2026

Someone is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LAN and wildcard modes can't be combined

1 participant