mirror of
https://gitlab.com/commento/commento.git
synced 2025-06-29 22:56:37 -04:00
everywhere: allow subdir-ed origin setups
Closes https://gitlab.com/commento/commento-ce/issues/61
This commit is contained in:
@ -10,6 +10,11 @@ import (
|
||||
func routesServe() error {
|
||||
router := mux.NewRouter()
|
||||
|
||||
subdir := pathStrip(os.Getenv("ORIGIN"))
|
||||
if subdir != "" {
|
||||
router = router.PathPrefix(subdir).Subrouter()
|
||||
}
|
||||
|
||||
if err := apiRouterInit(router); err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user