diff options
author | enahum <nahumhbl@gmail.com> | 2016-08-30 14:00:50 -0300 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2016-08-30 09:00:50 -0800 |
commit | 6c8746dbdc01e5f2b79152e2e495e914c5a9743d (patch) | |
tree | 7c2c07f228896fcf9e02148f551af201a98a132b /web/web.go | |
parent | 77656aea7f99dc7597b3c41e3dea96333ebfafd5 (diff) | |
download | chat-6c8746dbdc01e5f2b79152e2e495e914c5a9743d.tar.gz chat-6c8746dbdc01e5f2b79152e2e495e914c5a9743d.tar.bz2 chat-6c8746dbdc01e5f2b79152e2e495e914c5a9743d.zip |
PLT-4026 Use client dir constant for OAuth Authorization page (#3895)
Diffstat (limited to 'web/web.go')
-rw-r--r-- | web/web.go | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/web/web.go b/web/web.go index 1b50bf474..2d41081ae 100644 --- a/web/web.go +++ b/web/web.go @@ -16,17 +16,13 @@ import ( "github.com/mssola/user_agent" ) -const ( - CLIENT_DIR = "webapp/dist" -) - func InitWeb() { l4g.Debug(utils.T("web.init.debug")) mainrouter := api.Srv.Router if *utils.Cfg.ServiceSettings.WebserverMode != "disabled" { - staticDir := utils.FindDir(CLIENT_DIR) + staticDir := utils.FindDir(model.CLIENT_DIR) l4g.Debug("Using client directory at %v", staticDir) if *utils.Cfg.ServiceSettings.WebserverMode == "gzip" { mainrouter.PathPrefix("/static/").Handler(gziphandler.GzipHandler(staticHandler(http.StripPrefix("/static/", http.FileServer(http.Dir(staticDir)))))) @@ -76,5 +72,5 @@ func root(c *api.Context, w http.ResponseWriter, r *http.Request) { } w.Header().Set("Cache-Control", "no-cache, max-age=31556926, public") - http.ServeFile(w, r, utils.FindDir(CLIENT_DIR)+"root.html") + http.ServeFile(w, r, utils.FindDir(model.CLIENT_DIR)+"root.html") } |