hotel
hotel copied to clipboard
Path segments after service name not proxying correctly
I'm guessing this is just a configuration error, but for the life of me I can't seem to figure out how to get this to work. If I have a service web-workshop
that has a health endpoint, I can't seem to access it via localhost:2000/web-workshop/health, even though going to the /health endpoint on the localhost and port url works fine, and going to the web-workshop url works fine.
▶ curl -s -w "\nstatus: %{http_code}\n" http://localhost:2000/web-workshop
Found. Redirecting to http://localhost:49710
status: 302
▶ curl -s -w "\nstatus: %{http_code}\n" http://localhost:49710/health
status: 200
▶ curl -s -w "\nstatus: %{http_code}\n" http://localhost:2000/web-workshop/health
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot GET /web-workshop/health</pre>
</body>
</html>
status: 404
My configuration is fairly standard:
▶ cat ~/.hotel/conf.json
{
"port": 2000,
"host": "127.0.0.1",
"timeout": 5000,
"tld": "localhost",
"proxy": false
}
▶ cat ~/.hotel/servers/web-workshop.json
{
"cwd": "/path/to/code/web-workshop",
"cmd": "PORT=$PORT go run main.go",
"env": {
"PATH": "XXX"
}
Any thoughts on what I'm doing wrong, or is this really not supported?