router_static.go: inject origin instead of api
This commit is contained in:
parent
2d6ce008c6
commit
c5b29bbfe1
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user