mirror of
https://github.com/NarrativeScience-old/log.io.git
synced 2026-04-25 17:15:52 +03:00
[GH-ISSUE #90] log.io server access behind nodejs http-proxy #71
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/log.io-NarrativeScience-old#71
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @woale on GitHub (Aug 22, 2013).
Original GitHub issue: https://github.com/NarrativeScience-old/log.io/issues/90
I've setup nodejs http-proxy to access apps (with their specific ports) over port 80 through a specific subdomain, e.g. ;
var httpProxy = require('http-proxy');
var port = process.env.PORT || 80;
var options = {
hostnameOnly: true,
router: {
'app1.mydomain.com': '127.0.0.1:3131',
'app2.mydomain.com': '127.0.0.1:3132',
'app3.mydomain.com': '127.0.0.1:3133',
'logs.mydomain.com': '127.0.0.1:28778'
}
};
var proxyServer = httpProxy.createServer(options);
When accessed via the url before proxy (e.g. logs.mydomain.com), most of the time (not always!), the log.io page renders without any nodes/streams, and almost never any log updates are shown. While, accessing straight to 127.0.0.1:28778, all nodes & streams are given, and log updates are shown. Anyone else experiencing this ?
@msmathers commented on GitHub (Aug 1, 2014):
This is likely a websocket issue as they don't play nicely with reverse proxies, load balancers, etc... Most likely the http-proxy library is doing something to the websocket handshake or heartbeat that socket.io doesn't like. Unfortunately there's not much that can be done about this within the log.io application, we usually recommend a direct HTTP connection.