CSCfi / rems

Resource Entitlement Management System is a tool for managing access rights to resources, such as research datasets.
MIT License
52 stars 23 forks source link

feature: support running the app under a base URL #3363

Open delocalizer opened 3 days ago

delocalizer commented 3 days ago

Is your feature request related to a problem? Please describe.

Related issue: #3356

I would like to host REMS under a non-root URL e.g. https://my.domain/app1/ so that I may use path-based routing to gather related services under the same domain. This greatly simplifies sso and other shared origin requirements.

My reading and experiments lead me to think that currently I can't do this because REMS is a single-page app that doesn't support a non-base URL configuration. I have tried reverse proxy config in front but it is not sufficient because using e.g. nginx sub_filter or Apache mod_proxy_html can only rewrite paths that appear explicitly in responses and not the application paths dynamically generated in script.

Describe the solution you'd like

I would like a configuration point base-url that defaults to / but can be changed to something else e.g. /app1/, so that the REMS application paths are all relative to that base URL.

Describe alternatives you've considered

I have tried a reverse proxy. The best I can get REMS to work with is a proxy to a different port and/or subdomain, but not a new base path.

Additional context Thanks for creating and maintaining REMS. It's a great product.

meericsc commented 2 hours ago

Hi, thank you for the suggestion and feedback! We don't currently have plans to implement something like this as it would require quite many changes, but we’ll keep it in mind for the future. We also welcome contributions and would be happy to hear more about your REMS use cases.