Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RCloud router request #2389

Open
LanceJensen-General opened this issue Mar 6, 2017 · 3 comments
Open

RCloud router request #2389

LanceJensen-General opened this issue Mar 6, 2017 · 3 comments
Milestone

Comments

@LanceJensen-General
Copy link

I am requesting a router enhancement for R Cloud urls. Many customers would like to be able to serve content with their own branded domain and contextual path. An example of a service url for a Shiny page is as follows:

https://rcloud.web.att.com/shiny.html?notebook=6aeb54df08e2affe4b02f31c44de7015

Where many teams would like to be able to have something like this:

https://our.teams.host.name/shrinkage/report

The hostname part can be solved with a DNS update but providing a contextual path that is clean looking to customers I do not believe is feasible at this time.

My request is to implement a router function in the rcloud server. This router function would allow a user in the advanced menu to invoke a router wizard which allows the user to specify a path name at the for the RCloud host and then define how the platform should process that path. Using my simple example:

  'shrinkage/report'

Would be resolved by the rcloud platform as:

  'shiny.html?notebook=6aeb54df08e2affe4b02f31c44de7015'

All the requirements for this feature other than the simple case have been left intentionally vague other than the base example to permit flexibility of implementation if this feature enhancement is taken on...

@gordonwoodhull
Copy link
Contributor

As noted on internal SO, we have ?user=...&path=... and I can see how we could make the query string even shorter (and only have one part).

But I have no idea how to change the path - for complete control we'd probably have to delve into nginx's business.

@s-u might have some ideas here. This is related to #514 but more ambitious.

@gordonwoodhull gordonwoodhull added this to the 1.8 milestone Mar 10, 2017
@s-u
Copy link
Collaborator

s-u commented Mar 10, 2017

The R scripts (like notebook.R) support path parsing, so in principle you could write one that does something (similar to proxy.R). However, what Lance is proposing cannot work in generality, because a) it would change the root of the document and b) those pages actually rely on the query string so you can't strip it. The browser has to actually go to the full URL for it to function.

We can special-case things like shiny.html by having let's say shiny.R that generates modified code that embeds the query variables in the html output, but it's only viable for such special cases since the underlying system has to be aware of the change.

@s-u
Copy link
Collaborator

s-u commented Mar 10, 2017

As for branded domain/URL, that's really up to the user - you can always create one using iframe, e.g., see https://rcloud.social/notebook.R/s-u/iframe-example so I don't think this has really anything to do with RCloud

@gordonwoodhull gordonwoodhull modified the milestones: 1.8, Unknown Apr 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants