[GH-ISSUE #38] Invalid Host header #126

Closed
opened 2026-03-13 19:55:33 +03:00 by kerem · 4 comments
Owner

Originally created by @wandyirawan on GitHub (Mar 15, 2021).
Original GitHub issue: https://github.com/agrinman/tunnelto/issues/38

hi tunnelto.dev, i have try tunnnelto to access my react app at port 4200, but when i try the tunnel just show invalid host header,

i have try
tunnelto -p 4200 -s mainWeb -h localhost

or
tunnelto -p 4200 -s mainWeb

but noting happens, how to fix it? thanks

Originally created by @wandyirawan on GitHub (Mar 15, 2021). Original GitHub issue: https://github.com/agrinman/tunnelto/issues/38 hi tunnelto.dev, i have try tunnnelto to access my react app at port 4200, but when i try the tunnel just show invalid host header, i have try ` tunnelto -p 4200 -s mainWeb -h localhost` or ` tunnelto -p 4200 -s mainWeb` but noting happens, how to fix it? thanks
kerem 2026-03-13 19:55:33 +03:00
Author
Owner

@agrinman commented on GitHub (Apr 18, 2021):

Can you provide some more information like the output you get running it with the verbose command -v?

<!-- gh-comment-id:821922359 --> @agrinman commented on GitHub (Apr 18, 2021): Can you provide some more information like the output you get running it with the verbose command `-v`?
Author
Owner

@dcg90 commented on GitHub (Apr 20, 2021):

Hello @agrinman, I'm getting the same error (I think) for an angular/asp.net core app. I'm starting tunnelto like tunnelto.exe -s dev-env -p 50815 but when I navigate to https://dev-env.tunnelto.dev/ I get a bad request - invalid hostname response. I inspected the request on the dashboard and I see the host header is set to dev-env.tunnelto.dev (which makes sense) but I'm wondering if there's a way to override this header to be localhost:50815?

Thanks.

<!-- gh-comment-id:823547720 --> @dcg90 commented on GitHub (Apr 20, 2021): Hello @agrinman, I'm getting the same error (I think) for an angular/asp.net core app. I'm starting tunnelto like `tunnelto.exe -s dev-env -p 50815` but when I navigate to [https://dev-env.tunnelto.dev/](https://dev-env.tunnelto.dev/) I get a **bad request - invalid hostname** response. I inspected the request on the dashboard and I see the host header is set to `dev-env.tunnelto.dev` (which makes sense) but I'm wondering if there's a way to override this header to be localhost:50815? Thanks.
Author
Owner

@agrinman commented on GitHub (Apr 20, 2021):

Can you just set the host header on your request, this isn't a tunnelto issue as the request arrives as sent.

Ie: curl -H "host: localhost" ...

<!-- gh-comment-id:823599045 --> @agrinman commented on GitHub (Apr 20, 2021): Can you just set the host header on your request, this isn't a tunnelto issue as the request arrives as sent. Ie: `curl -H "host: localhost" ...`
Author
Owner

@agrinman commented on GitHub (Apr 20, 2021):

Closing this for now please, re-open if there's some weird behavior with tunnelto. Thanks!

<!-- gh-comment-id:823671534 --> @agrinman commented on GitHub (Apr 20, 2021): Closing this for now please, re-open if there's some weird behavior with tunnelto. Thanks!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tunnelto#126
No description provided.