summaryrefslogtreecommitdiffstats
path: root/web/templates/head.html
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2015-10-20 04:37:51 -0700
committer=Corey Hulen <corey@hulen.com>2015-10-20 04:37:51 -0700
commitfa3a0df2b63d3f1bbbad44bf20afa48fed42aa06 (patch)
tree7ed37f554aae729a6fad579bc1a82e988de45971 /web/templates/head.html
parent36658c13a4c7ebdfff22b8570e0db52bfa4de000 (diff)
downloadchat-fa3a0df2b63d3f1bbbad44bf20afa48fed42aa06.tar.gz
chat-fa3a0df2b63d3f1bbbad44bf20afa48fed42aa06.tar.bz2
chat-fa3a0df2b63d3f1bbbad44bf20afa48fed42aa06.zip
Adding multi-session cookie
Diffstat (limited to 'web/templates/head.html')
-rw-r--r--web/templates/head.html17
1 files changed, 10 insertions, 7 deletions
diff --git a/web/templates/head.html b/web/templates/head.html
index 31a3c97f2..731bcd691 100644
--- a/web/templates/head.html
+++ b/web/templates/head.html
@@ -18,13 +18,6 @@
<link rel="manifest" href="/static/config/manifest.json">
<!-- Android add to homescreen -->
- <script>
- window.mm_config = {{ .ClientCfg }};
- window.mm_team = {{ .Team }};
- window.mm_user = {{ .User }};
- window.mm_session = {{ .Session }};
- </script>
-
<!-- CSS Should always go first -->
<link rel="stylesheet" href="/static/css/bootstrap-3.3.5.min.css">
<link rel="stylesheet" href="/static/css/jasny-bootstrap.min.css">
@@ -47,6 +40,16 @@
<style id="antiClickjack">body{display:none !important;}</style>
<script>
+ window.mm_config = {{ .ClientCfg }};
+ window.mm_team = {{ .Team }};
+ window.mm_user = {{ .User }};
+ window.mm_session_token_hash = {{ .SessionTokenHash }};
+ $.ajaxSetup({
+ headers: { 'X-MM-TokenHash': mm_session_token_hash }
+ });
+ </script>
+
+ <script>
window.onerror = function(msg, url, line, column, stack) {
var l = {};
l.level = 'ERROR';