-
Notifications
You must be signed in to change notification settings - Fork 182
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
The /mail service request always goes to localhost #161
Comments
I can see that the serviceURL is set to localhost, in my brower's localstorage. If I manually edit that to be "vm" instead of "localhost", everything works fine. I searched the codebase and can't figure out where it's getting the "localhost" value from. Edit - ok I figured out where the "localhost" value in the serviceURL is coming from. It's getting picked up from the "smtpAddress" in the config file. If I change that smtpAddress to "vm", then the web interface works fine (no more service requests to localhost). However, my applications can no longer relay mail through mailslurper, since it's no longer listening on localhost. I'm guessing there is a bug in the code somewhere, where the serviceURL is being set from the smtpAddress, instead of being set from serviceAddress. BTW it seems like this should be solvable using the |
Same issue here, I have mailslurper in kubernetes with two ingress, one for the webmail and one for the service, and found now way to have the service URL to be used by the UI. ServicePublicURL is not use in the UI, nor stored in the localstorage. |
Thank you @stillnet to point out the local storage, I didn't think about it. I simply solved the issue by deleting the key in the browser, reload and then my actual config was taken. This issue seems to be solved but just think about clearing the localstorage when you change the config. |
I'm trying to run mailslurper on a VM, and browse to it from the host machine. My VM has an IP address of 192.168.26.26. I have updated the mailslurper config file to use this IP. I have a hostname setup on my host pointing "vm" to 192.168.26.26.
When I browse to "http://vm:8025", mailslurper loads, but it does not load any mail. This is because the /mail request is failing, I can see it in Chrome dev tools. It's failing because it's trying to reach http://localhost:8085/mail?pageNumber=1&message...etc.
Why is it trying to connect on localhost? If I load mailslurper using http://192.168.26.26 everything works fine. But the "vm" hostname does resolve to 192.168.26.26, both on the host and the guest virtual machine.
The text was updated successfully, but these errors were encountered: