about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEmile <hanemile@protonmail.com>2019-10-20 16:57:08 +0200
committerEmile <hanemile@protonmail.com>2019-10-20 16:57:08 +0200
commit7506d88e8e8a6a5e118473963f671429a532a71c (patch)
treee220bceb7819538f75da88e2416b207f22b62101
parent115145833a532145f047b37d3b661ae1a4f81881 (diff)
ctfname env var
-rw-r--r--hosted/index.html2
-rw-r--r--src/http.go1
2 files changed, 2 insertions, 1 deletions
diff --git a/hosted/index.html b/hosted/index.html
index ecc3989..3a18848 100644
--- a/hosted/index.html
+++ b/hosted/index.html
@@ -8,7 +8,7 @@
     </head>
     <body>
         <nav class="navbar navbar-expand-md navbar-dark bg-dark mb-4">
-            <a class="navbar-brand" href="/">dorfCTF</a>
+            <a class="navbar-brand" href="/">{{.CTFName}}</a>
             <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
                 <span class="navbar-toggler-icon"></span>
             </button>
diff --git a/src/http.go b/src/http.go
index 248eea4..f09f0bb 100644
--- a/src/http.go
+++ b/src/http.go
@@ -50,6 +50,7 @@ func indexHandler(w http.ResponseWriter, r *http.Request) {
 
 	content := Content{
 		Hostname: os.Getenv("HOSTNAME"),
+		CTFName:  os.Getenv("CTFNAME"),
 	}
 
 	t.ExecuteTemplate(w, "index", content)