Skip to content

Commit

Permalink
amend to allow the callback url to use custom server ip and port as w…
Browse files Browse the repository at this point in the history
…ell.

Note that this is required even in non-dockerized versions, e.g. when running RStudio-server from a cluster.  The dockerized sitation
is worse, in that HTTP_LOCALHOST must be set to 0.0.0.0, while the callback (HTTP_SERVER) must be set to the server's IP address instead.
In non-dockerized instances running on a server, both HTTP_LOCALHOST and HTTP_SERVER would simply be the server's IP
  • Loading branch information
cboettig committed May 22, 2015
1 parent 4b2b32c commit 71fb959
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/oauth-listener.r
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ oauth_listener <- function(request_url, is_interactive = interactive()) {
#' @keywords internal
#' @export
oauth_callback <- function() {
"http://localhost:1410/"
paste0("http://",
Sys.getenv("HTTR_SERVER", "localhost"),
":",
Sys.getenv("HTTR_SERVER_PORT", "1410"))
}

listener_endpoint <- function() {
Expand Down

0 comments on commit 71fb959

Please sign in to comment.