Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

translateLocalUrl

Translate Local URL


Description

Translates a local URL into an externally accessible URL on RStudio Server.

Usage

translateLocalUrl(url, absolute = FALSE)

Arguments

url

The fully qualified URL to translate; for example, http://localhost:1234/service/page.html.

absolute

Whether to return a relative path URL (the default) or an absolute URL.

Details

On RStudio Server, URLs which refer to the local host network address (such as http://localhost:1234/ and http://127.0.0.1:5678/) must be translated in order to be externally accessible from a browser. This method performs the required translation, and returns the translated URL, which RStudio Server uses to proxy HTTP requests.

Returns an unmodified URL on RStudio Desktop, and when the URL does not refer to a local address.

Value

The translated URL.


rstudioapi

Safely Access the RStudio API

v0.13
MIT + file LICENSE
Authors
Kevin Ushey [aut, cre], JJ Allaire [aut], Hadley Wickham [aut], Gary Ritchie [aut], RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.