Skip to content

Loading…

Add 'host' header to connection objects #105

Merged
merged 1 commit into from

2 participants

@jcheng5

This makes it possible to use a single SockJS server with multiple
virtual hosts (that each might have unique logic).

@jcheng5 jcheng5 Add 'host' header to connection objects
This makes it possible to use a single SockJS server with multiple
virtual hosts (that each might have unique logic).
8b03b3b
@majek majek merged commit e3d3695 into sockjs:master
@majek
SockJS - WebSocket emulation member

Sounds good! Cheers :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 20, 2012
  1. @jcheng5

    Add 'host' header to connection objects

    jcheng5 committed
    This makes it possible to use a single SockJS server with multiple
    virtual hosts (that each might have unique logic).
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/transport.coffee
View
2 src/transport.coffee
@@ -130,7 +130,7 @@ class Session
headers = {}
for key in ['referer', 'x-client-ip', 'x-forwarded-for', \
- 'x-cluster-client-ip', 'via', 'x-real-ip']
+ 'x-cluster-client-ip', 'via', 'x-real-ip', 'host']
headers[key] = req.headers[key] if req.headers[key]
if headers
@connection.headers = headers
Something went wrong with that request. Please try again.