Re: Configure Preview URL


#1

I really did look, but I can’t find the docs that explain the "configure Preview URL: setting.

Could you please point me to the link?


#2

there is no documentation, it just allows to customize default url, in case your app needs something appended to the url, you can use $C9_HOSTNAME in the url instead of workspace-username.c9users.io https://github.com/c9/c9.ide.preview/blob/master/preview.js#L407


#3

I have a related question… the Live Preview URL is:

https://preview.c9users.io/username/workspace/

However, this breaks absolute URL’s in Live Preview such as img src="/foo/bar.png" because it will resolve to https://preview.c9users.io/foo/bar.png

I set the Preview URL to https://workspace-username.c9users.io/ and it works for regular preview, but not for Live Preview while editing (all absolute URL’s break, and I need that when converting to production).

Is there a way to have absolute URLs in Live Preview?


#4

unfortunately there is no way to change url of live preview