Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

fix serving static issues #14

Merged
merged 1 commit into from
Dec 17, 2019
Merged

fix serving static issues #14

merged 1 commit into from
Dec 17, 2019

Conversation

butonic
Copy link
Member

@butonic butonic commented Dec 13, 2019

ocis-hello uses "/" as root. adding another / causes the static middleware to always fail stripping that prefix. all requests will return 404.

setting root to "" in the ocis-hello flag does not work because the chi dies screaming that routes need to start with a /.

path.Clean(root+"/") would yield "" for root="/"

so I think this is the correct fix. unless we want to safeguard against an admin trying to use .. in the assets path, which should be permitted IMO.

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Copy link
Contributor

@tboerger tboerger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also provide a bugfix changelog file

@DeepDiver1975 DeepDiver1975 merged commit eab9424 into master Dec 17, 2019
@delete-merged-branch delete-merged-branch bot deleted the fix/static-assets branch December 17, 2019 08:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants