How to make Django pass cookies when communicating with Node.js server using socket.io? -


i developing instant messaging feature apps (ideally cross platform mobile app/web app), , out of ideas fix issue. far, have been able make work locally, using node.js server socket.io, django, , redis, following tutorials online suggest. step @ consists in putting in cloud using amazon aws. django server , running, created new separate node.js server, , using elasticache handle redis part. launch different parts, , no error shows up. however, whenever try using messaging feature on web, keep getting error 500:

handshake error

i used console check request header, , observed cookies not in there, contrary when on localhost. know necessary authorize handshake, guess that's error coming from..

furthermore, have checked cookies exist, not set in request header.

my question then: how can make sure django or socket client (not sure who's responsible here..) puts cookies in header??

one of ideas maybe supposed put on same server, different ports, instead of 2 separate servers? documentation on specific architecture problem surprisingly scarce, compared number of tutorials describing how make work on local.

i hope described problem accurately enough! :)

important note: using socket.io v0.9.1-1, 1 compatible titanium mobile app.

thank help!

all right, i've made progress. cookie problem came fact making cross-domain request, adding few lines enabled cors, didn't solve cookie issue, allowed me communicate between servers (basically set headers of response using express. passed necessary data in query, if not secure way it, i'm building mvp, , it's enough now.

i haven't been able make chat work titanium mobile app, since can use webview handle it, fine.

hopefully someone.. if needs me post code snippets gladly upon request!

cheers


Comments

Popular posts from this blog

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -

YouTubePlayerFragment cannot be cast to android.support.v4.app.Fragment -