-
Notifications
You must be signed in to change notification settings - Fork 2k
Cannot GET //socket.io/socket.io.js
when using Express, Socket.io and node-http-proxy
#352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This has nothing to do with |
Actually, that's what is currently written in the index.html file. I thought I'd revised that gist to the current implementation, but I guess not. This bug was confirmed in the #nodejitsu channel a few nights ago. |
Try it without the router. Just do a straight proxy. |
@mrryanjohnston What version of node-http-proxy are you using? I think I may have saw something from an old version and gotten confused. Or maybe I was really too tired that night, I was sure I saw a In any case, if you want to come into #nodejitsu again we can try to debug it some more. |
@mrryanjohnston I think I know the problem. Try using 'dev.example.com/test/' in the proxy table. @indexzero The test prefix makes sense. He's requesting the 'dev.example.com/test' thing, so if he doesn't use the '/test/' prefix, it won't route to that express server, thereby not finding that path. The fact that he got that express error shows that it's connecting to the express server, like he wants. It's just due to the way I wrote the URL replacement code. I think we can fix this by adding a '/' at the end of the origin URL if the user didn't add it, or removing the first '/' in the request URL, and adding it back in if it's not there at the end of that transformation process. I think the latter is a better idea. |
@mrryanjohnston Can you please try it without the |
Sorry about the delay on this one, guys. Holidays and whatnot :) @coderarity package.json says @indexzero If I change the line to the following, the socket.io script is placed at localhost:8080/socket.io/socket.io.js as expected: |
@mrryanjohnston I suspect this is related to the ProxyTable somewhere. I'll leave this open to investigate, but I won't lie the |
@mrryanjohnston Heh, that's not the URL I suggested, yo. You've got to use "dev.example.com/test/" (note the ending /). :D |
@coderarity So this does two things:
|
How are you connecting to socket.io? I think that might be where the About #1, that's part of fixing the proxy table issues. On Thursday, January 3, 2013, Ryan Johnston wrote:
Christian Howe (coderarity) |
@coderarity Sorry for the delay on this. Haven't had a chance for fun side-projects for a while :) I'm currently connecting with an absolute link: I understand it's not a super high-priority thing for this project. All the same, thanks for all of your help on this. |
Hi, i had the same issue and solved it:
|
Closing due to old age and related to old version of |
The following gist produces a
socket.io/socket.io.js 404 (Not Found)
error on the browser's side:https://gist.github.com/4324446
This gist does not reproduce that error:
https://gist.github.com/4324576
The text was updated successfully, but these errors were encountered: