mirror of
https://gitlab.com/commento/commento.git
synced 2025-06-29 22:56: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 := ""
|
||||
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);
|
||||
|
Reference in New Issue
Block a user