Skip to content
This repository was archived by the owner on Apr 6, 2021. It is now read-only.
This repository was archived by the owner on Apr 6, 2021. It is now read-only.

Polling behind a reverse proxy #29

@mculbert

Description

@mculbert

As I understand it, the nginx reverse proxy doesn't support websockets, so when Cloud9 is behind an SSL nginx proxy (https://c9host --> http://c9host:3131), smith.io reverts to the polling mechanism. In this case, the Cloud9 IDE loads well enough and I can open and view files, but it isn't possible to edit anything. The javascript console indicates that engine.io-dev.js is trying to open a connection to http://c9host:3131/smith.io/server/?uid=[uid]&transport=polling, but this should be https://c9host/smith.io/etc.

If I change the return value of Polling.prototype.uri() in engine.io-dev.js from:

  return schema + '://' + this.host + port + this.path + query;

to:

  return this.path + query;

the javascript error goes away and I can edit files in the Cloud9 IDE, as expected.

I'm not sure whether the full URI is really needed here and this workaround is going to break something else, but there are others interested in putting Cloud9/smith.io behind nginx (e.g. cloud9 #2161), so I'm sure a permanent solution would be greatly appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions