* removed unused js libraries * added cached control for lb handling
This commit is contained in:
parent
b9343ee6e0
commit
81218f6ea8
@ -21,7 +21,7 @@ func GetStatic(fs *embed.FS, c echo.Context) (err error) {
|
||||
cnt, err := fs.ReadFile(fmt.Sprintf("%s/%s", basedir, name))
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
return c.String(http.StatusNotFound, "")
|
||||
return c.String(http.StatusNotFound, "")
|
||||
}
|
||||
|
||||
if strings.HasSuffix(name, ".js") {
|
||||
@ -29,6 +29,7 @@ func GetStatic(fs *embed.FS, c echo.Context) (err error) {
|
||||
} else if strings.HasSuffix(name, ".css") {
|
||||
c.Response().Header().Set(echo.HeaderContentType, "text/css")
|
||||
}
|
||||
c.Response().Header().Add("Cache-Control", "max-age=172800")
|
||||
return c.String(http.StatusOK, string(cnt))
|
||||
}
|
||||
|
||||
|
@ -16,6 +16,7 @@ func (t *Template) Render(w io.Writer, name string, data interface{}, c echo.Con
|
||||
if strings.HasSuffix(name, ".html") {
|
||||
c.Response().Header().Set(echo.HeaderContentType, echo.MIMETextHTMLCharsetUTF8)
|
||||
}
|
||||
c.Response().Header().Add("Cache-Control", "max-age=172800")
|
||||
return t.templates.ExecuteTemplate(w, name, data)
|
||||
}
|
||||
|
||||
|
1715
static/js/axios.js
1715
static/js/axios.js
File diff suppressed because it is too large
Load Diff
3
static/js/axios.min.js
vendored
3
static/js/axios.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1,14 +1,3 @@
|
||||
function export_frs() {
|
||||
var w = window.location.href = "/export_frs.csv";
|
||||
}
|
||||
|
||||
new Vue({
|
||||
el: '#countries',
|
||||
data: {
|
||||
selected: "France",
|
||||
options: [{
|
||||
text: 'France',
|
||||
value: 'france'
|
||||
}, ]
|
||||
}
|
||||
})
|
6
static/js/vue.min.js
vendored
6
static/js/vue.min.js
vendored
File diff suppressed because one or more lines are too long
@ -10,13 +10,10 @@
|
||||
<link rel="stylesheet" type="text/css" href="static/css/responsive.dataTables.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="static/css/rowReorder.dataTables.min.css">
|
||||
|
||||
|
||||
<script src="static/js/jquery.js"></script>
|
||||
<script src="static/js/jquery.dataTables.min.js"></script>
|
||||
<script src="static/js/bootstrap.min.js"></script>
|
||||
<script src="static/js/dataTables.bootstrap4.min.js"></script>
|
||||
<script src="static/js/axios.min.js"></script>
|
||||
<script src="static/js/vue.min.js"></script>
|
||||
<script src="static/js/datatable.min.js"></script>
|
||||
<script src="static/js/functions.js"></script>
|
||||
</head>
|
||||
|
Loading…
Reference in New Issue
Block a user