mirror of
https://gitlab.com/commento/commento.git
synced 2025-06-30 11:06:37 -04:00
router_static.go: inject CDN_PREFIX in JS files
This commit is contained in:
@ -46,7 +46,8 @@ func initStaticRouter(router *mux.Router) error {
|
|||||||
|
|
||||||
prefix := ""
|
prefix := ""
|
||||||
if dir == "js" {
|
if dir == "js" {
|
||||||
prefix = "window.origin='" + os.Getenv("ORIGIN") + "';"
|
prefix = "window.origin='" + os.Getenv("ORIGIN") + "';\n"
|
||||||
|
prefix += "window.cdn='" + os.Getenv("CDN_PREFIX") + "';\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
asset[p] = prefix + string(contents);
|
asset[p] = prefix + string(contents);
|
||||||
|
Reference in New Issue
Block a user