souramoo / commentoplusplus

Commento with out of the box patches and updates to add useful features and fixes. Also with one-click deploy to Heroku so you can get up and running fast.
MIT License
391 stars 63 forks source link

Update router_static.go #26

Closed Targunitoth closed 3 years ago

Targunitoth commented 3 years ago

See https://gitlab.com/commento/commento/-/issues/99, this is the solution from @pixeldrew. It would be nice if you could finally add his pull request to commento

souramoo commented 3 years ago

Thanks for bringing the issue to my attention! This is a slightly hacky fix to the problem, because the key is set to subdir+path and then removed again with a strings.Replace.

As @pixeldrew mentions, the subdirectory stuff is taken care of in router.go with router = router.PathPrefix(subdir).Subrouter() and so I will quickly refactor this code to not bother to add the subdir into the assets keys which should be a cleaner fix to the issue.

souramoo commented 3 years ago

Should now be fixed from 07e718a onwards, please test this out and report back if this is still an issue!