Skip to content

READMEs use deprecated ngrok --host-header=rewrite; switch to traffic policy (or drop it) #162

Description

@zimeg

What

Recent ngrok versions print a deprecation warning for the --host-header flag:

Flag --host-header has been deprecated, use traffic policy instead

ngrok is moving Host-header rewriting off the dedicated flag onto its rule-based traffic policy system. The flag will eventually be removed.

Where we use it

Three example READMEs instruct developers to run the deprecated form:

  • ai/slackbot-mcp-client/no-auth/README.mdngrok http 3000 --host-header=rewrite
  • ai/slackbot-mcp-client/rich-responses/mcp-apps/README.mdngrok http 3000 --host-header=rewrite
  • ai/slackbot-mcp-client/slack-identity/README.mdngrok http 3000 --host-header=rewrite

So anyone following these examples' setup steps hits the deprecation warning today, and the command will break when ngrok removes the flag.

(For contrast, SCRATCHPAD.md already uses the bare ngrok http 3000 form — unaffected.)

Suggested fix

Update the three READMEs. Two options:

  1. Drop the flag (simplest — verify it still works): ngrok http 3000. Slack/Bolt apps generally don't need Host rewriting; the local receiver doesn't inspect Host. If the examples run fine without it, this is the cleanest fix.
  2. If Host rewriting is actually needed, replace it with a traffic policy:
    # policy.yml  — ngrok http 3000 --traffic-policy-file=policy.yml
    on_http_request:
      - actions:
          - type: add-headers
            config:
              headers:
                host: localhost:3000

Recommend confirming option 1 works (run each example end-to-end without the flag) before committing to it.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdependenciesPull requests that update a dependency filedocumentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions