forked from boyska/feedpanel
http prefix
This commit is contained in:
parent
bf0fd51252
commit
96e03af79c
2 changed files with 8 additions and 3 deletions
|
@ -1,8 +1,8 @@
|
|||
<html>
|
||||
<head>
|
||||
<!-- TODO: utf8 -->
|
||||
<link rel="stylesheet" href="/static/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
|
||||
<script src="/static/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
|
||||
<meta charset="UTF-8">
|
||||
<link rel="stylesheet" href="{{.BaseURL}}static/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
|
||||
<script src="{{.BaseURL}}static/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
|
|
|
@ -32,6 +32,11 @@ func templateExecute(w http.ResponseWriter, r *http.Request, name string, box *r
|
|||
if strings.HasSuffix(name, ".html") {
|
||||
w.Header().Set("Content-type", "text/html")
|
||||
}
|
||||
if pref, has := os.LookupEnv("PANEL_PREFIX"); has {
|
||||
data["BaseURL"] = pref
|
||||
} else {
|
||||
data["BaseURL"] = "/"
|
||||
}
|
||||
tmpl.Execute(w, data)
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue