Compare commits
No commits in common. "53f4fc363ab3bf376e2ca7ef5852c99fc419b349" and "7afe8316a96a7edb7ef6268c98e86c06a4bd9083" have entirely different histories.
53f4fc363a
...
7afe8316a9
9
main.go
9
main.go
@ -20,7 +20,7 @@ import (
|
|||||||
_ "embed"
|
_ "embed"
|
||||||
)
|
)
|
||||||
|
|
||||||
const VERSION = "v6";
|
const VERSION = "v0.3.0";
|
||||||
const LISTEN_HOST = "0.0.0.0";
|
const LISTEN_HOST = "0.0.0.0";
|
||||||
const DB_SCHEMA = 10
|
const DB_SCHEMA = 10
|
||||||
|
|
||||||
@ -112,12 +112,7 @@ func staticHandler(w http.ResponseWriter, r *http.Request) {// {{{
|
|||||||
// To get rid of problems with cached content in browser on a new version release,
|
// To get rid of problems with cached content in browser on a new version release,
|
||||||
// while also not disabling cache altogether.
|
// while also not disabling cache altogether.
|
||||||
log.Printf("static: %s", r.URL.Path)
|
log.Printf("static: %s", r.URL.Path)
|
||||||
if r.URL.Path == "/favicon.ico" {
|
rxp := regexp.MustCompile("^/(css|images|js|fonts)/v[0-9]+\\.[0-9]+\\.[0-9]+/(.*)$")
|
||||||
static.ServeHTTP(w, r)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
rxp := regexp.MustCompile("^/(css|images|js|fonts)/v[0-9]+/(.*)$")
|
|
||||||
if comp := rxp.FindStringSubmatch(r.URL.Path); comp != nil {
|
if comp := rxp.FindStringSubmatch(r.URL.Path); comp != nil {
|
||||||
r.URL.Path = fmt.Sprintf("/%s/%s", comp[1], comp[2])
|
r.URL.Path = fmt.Sprintf("/%s/%s", comp[1], comp[2])
|
||||||
static.ServeHTTP(w, r)
|
static.ServeHTTP(w, r)
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 2.6 KiB |
@ -5,6 +5,8 @@
|
|||||||
<meta name="viewport" content="initial-scale=1.0, user-scalable=yes" />
|
<meta name="viewport" content="initial-scale=1.0, user-scalable=yes" />
|
||||||
<link rel="stylesheet" type="text/css" href="/css/{{ .VERSION }}/main.css">
|
<link rel="stylesheet" type="text/css" href="/css/{{ .VERSION }}/main.css">
|
||||||
<link rel="stylesheet" type="text/css" href="/css/{{ .VERSION }}/login.css">
|
<link rel="stylesheet" type="text/css" href="/css/{{ .VERSION }}/login.css">
|
||||||
|
<script type="text/javascript" src="/js/{{ .VERSION }}/lib/sjcl.js"></script>
|
||||||
|
<script type="text/javascript" src="/js/{{ .VERSION }}/lib/css_reload.js"></script>
|
||||||
<script type="importmap">
|
<script type="importmap">
|
||||||
{
|
{
|
||||||
"imports": {
|
"imports": {
|
||||||
@ -22,8 +24,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<script type="text/javascript" src="/js/{{ .VERSION }}/lib/sjcl.js"></script>
|
|
||||||
<script type="text/javascript" src="/js/{{ .VERSION }}/lib/css_reload.js"></script>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user