feat: add optional browser history routing to restrict #2689
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.
Purpose
If you want to restrict creating secrets, e.g. via a proxy or firewall, you can already restrict access to
/secret
and/file
via denying every method exceptGET
in a proxy.But it's not applicable to the UI/webapp as the public endpoint is
/#/s/{key}
and aHashRouter
is used. So anybody can still access the/
route and could be confused due to no error for access denied. Therefor you not need to have reak separate routes for the UI.Related to #1635
Implemented solution
Add new build-time-env
ROUTER_TYPE
defaults to 'hash' with optional 'history' value to use the browsers history api for routing. Also refactor Dockerfile to improve performance on subsequent builds.