router_static.go: inject CDN_PREFIX in JS files
This commit is contained in:
parent
02f134932f
commit
79f39f8094
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user