Correct URLs aren't being generated
I booted up a PHP server by running php artisan serve and then I ran expose share http://localhost:8000.

I was able to reproduce this too. It works fine when sharing the local URL on port 80/443.
I believe the problem comes from us not sending the X-Forwarded-Port header and therefore Symfony/Laravel does not trust the proxy server and does not use it to build the URL.
Alright, after looking into this some more this seems to be related to the way that we set the Host and X-Original-Host header.
Before the incoming HTTP request gets sent to the connected client, expose modifies the Host header to match the host that was specified when the connection was set up.
See: https://github.com/beyondcode/expose/blob/e870878bceb84b9f5d8ec6c81bb89078e2489d15/app/Server/Http/Controllers/TunnelMessageController.php#L116
For example, when doing expose share my-site.test , the host would be my-site.test.
For expose share localhost:8000 it would be localhost:8000.
And that exactly seems to be the problem. If we don't have a special hostname, we should use the expose server subdomain+domain combination here.
I haven't used laravel zero before but i'd be willing to take this on if that's okay
@jamesdube, if you need any help with Laravel Zero I'd be happy to help. 👍
@owenvoke Thanks will ping you
Also
expose http://localhost/ gives:
Expose-URL: http://uzr1ysmxsw.sharedwithexpose.com:443
Expose-URL: https://uzr1ysmxsw.sharedwithexpose.com
Note the http (no S) and :443 which is invalid - when used gives:
Hi, I can confirm that the issue from @ah040100 still same. I'm using expose version 2.6.2. Currently, the solution I can use is using Laravel Valet to create local custom domain and let expose detect when I run expose command. If you're using Windows, maybe you can use Laragon to create local custom domain.