This repository was archived by the owner on Jun 10, 2022. It is now read-only.
add redirect to reports/ before throwing 404: #25
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Added a middleware method to the app to redirect the user to
/reports/before throwing a 404 error. The default setup for Shiny server installations is for a server to host a directory of apps - so that navigating to "example.com/appName" would take you to the app in the folder appName, and this pull request is an attempt to replicate that.References
Fix based on issue discussed in #20.
Note - this is a quick fix that I'm using on my own deployment of this app. I do wonder if long-term it might be better to not do a redirect at all, but instead to proxy the shiny apps directly on the root (while leaving the 'auth' endpoints (login, logout, callback) for the authentication system to handle). I think this would be a cleaner experience for the users, but that would involve more complex changes to this app and so might not be worth it.
If this is something that you're working on or aiming to resolve another way, please feel free to reject this PR!
Best,
Dave