-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not working with local domains #170
Comments
the usage looks correct to me ... could you try to find out what's going wrong? Maybe you caught a bug |
I'm seeing something similar. It looks like my actual server (http://myapp.test:8000/github/webhook based on the OP example) isn't actually receiving the request from smee-client. smee-client is somehow catching a 404 response from the target, but my server isn't actually being forwarded. I'll include more details if I can figure out exactly what is going on here, but I suspect it might have something to do with the host header getting dropped somewhere? I'm not using Valet at the moment, but I'm guessing the target URL is being resolved correctly but maybe being accessed by IP or in some way in which the original host isn't being propagated to the request smee-client is making against my server. In my case I'm using traefik instead of Valet. |
Oh, hey, this was fast! :) I think I was correct, here. In the case of both Valet and my traefik setup, the idea is to host multiple sites between one endpoint/reverse proxy. So, my setup looks like this: NODE_TLS_REJECT_UNAUTHORIZED=0 \
smee \
--url https://smee.io/mVGuv0UG42AdJ7wA \
--target https://prdeploy.test/github-app I started digging into the logs a little deeper and I can see what's going on here:
It looks like smee-client is passing on the original host (smee.io) from the URL to the target host. Since my app is listening on prdeploy.test and not smee.io, it's throwing a 404. I'm guessing the same thing happens with Valet since it is a reverse-proxy machine sorta like what traefik is doing. Ideally, I would have expected in my case for the target host to NOT be dropped. I sorta thought it was weird (unexpected?) that the port and path were specified independently when the --target required a full URL. If we wanted to support this behavior, what would be the best way to do so? :) Should we add a flag like |
Looks like this is likely related to #162. I'm going to send an alternative patch as I don't know if deleting the host header is the correct move here. |
is myapp.test a virtual host on your web server? if that is the case the web server uses the HOST header to resolve the HTTP request. smee passes HOST=smee.io instead of the --target hostname which produces a series of problems including if you have ssl certificates |
Just come across this same issue too. Valet uses dnsmasq to allow using domains in the .test namespace, but smee doesn't seem to work with them. It's resolving to my valet server, but only returning a 404 which suggests it's not resolving to the correct site. As a workaround, I had to run |
I've installed the smee client and set up the smee channel. The following command works fine:
smee --url https://smee.io/my-channel-id --path /github/webhook --port 8000
It delivers all payloads to
http://127.0.0.1:8000/github/webhook
url properly. But if I use my local domain which I've setup with Valet, it doesn't work.Here is my command:
smee --target http://myapp.test/github/webhook --url https://smee.io/my-channel-id
I also tried supplying port, but it doesn't work:
smee --target http://myapp.test:8000/github/webhook --url https://smee.io/my-channel-id
Am I missing anything here?
The text was updated successfully, but these errors were encountered: