router_static.go: inject origin instead of api

This commit is contained in:
Adhityaa 2018-06-03 17:27:42 +05:30
parent 2d6ce008c6
commit c5b29bbfe1

View File

@ -43,7 +43,7 @@ func initStaticRouter(router *mux.Router) error {
}
if dir == "js" {
asset[path] = "window.API='" + os.Getenv("ORIGIN") + "/api';" + string(contents)
asset[path] = "window.origin='" + os.Getenv("ORIGIN") + "';" + string(contents)
} else {
asset[path] = string(contents)
}