c9 / core

Cloud9 Core - Part of the Cloud9 SDK for Plugin Development https://c9.github.io/core/ https://c9.io
Other
2.56k stars 921 forks source link

[plugins.c9.vfs.standalone] use current hostname for preview vfs-target #467

Closed das7pad closed 6 years ago

das7pad commented 7 years ago

Running c9 in standalone mode on a remote Host or different IP blocks the Preview-feature for document-types other than markdown:

{"error":{"code":500,"scope":"standalone","message":"connect ECONNREFUSED"}}

The source of this problem is the hardcoded hostname in the /preview api-endpoint: localhost.

This PR resolves the problem in using the actual host instead of localhost.