From c5b29bbfe1d3696ecae9a657c9d0d2052239ce79 Mon Sep 17 00:00:00 2001 From: Adhityaa Date: Sun, 3 Jun 2018 17:27:42 +0530 Subject: [PATCH] router_static.go: inject origin instead of api --- api/router_static.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/router_static.go b/api/router_static.go index a15c980..b97a6e9 100644 --- a/api/router_static.go +++ b/api/router_static.go @@ -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) }