typicode / hotel

🏩 A simple process manager for developers. Start apps from your browser and access them using local domains
MIT License
9.98k stars 426 forks source link

Hotel is proxying request from running app #302

Open gardenerik opened 6 years ago

gardenerik commented 6 years ago

Hello,

today I encountered this weird issue. I was testing our application (PHP / Laravel), that needed to communicate with external services over https. When I ran the code from CLI, it worked. But when run from browser, it failed with cURL error 60: SSL certificate problem: self signed certificate after a bit of debugging, I found out that Hotel was messing with the request, or at least I think so.

Curl reported error SSL: certificate subject name 'Hotel' does not match target host name 'my.website.com'. Running latest (0.8.6) on Ubuntu 16.04.

gardenerik commented 6 years ago

After more investigation I found out that hotel sets HTTP_PROXY environment values here. But I was unable to get rid of them (tried setting "httpProxyEnv" to false).

I was only able to change environment values from PHP:

putenv('http_proxy=');
putenv('https_proxy=');
putenv('HTTP_PROXY=');
putenv('HTTPS_PROXY=');