mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-18 13:06:09 +05:00
update gen_web and modules
This commit is contained in:
@@ -97,6 +97,12 @@ func RouteWebPages(route *gin.RouterGroup) {
|
||||
sort.Strings(keys)
|
||||
for _, link := range keys {
|
||||
fmime := mime.TypeByExtension(filepath.Ext(link))
|
||||
if fmime == "application/xml" || fmime == "application/javascript" {
|
||||
fmime = fmime + "; charset=utf-8"
|
||||
}
|
||||
if fmime == "image/x-icon" {
|
||||
fmime = "image/vnd.microsoft.icon"
|
||||
}
|
||||
embedStr += `
|
||||
route.GET("` + link + `", func(c *gin.Context) {
|
||||
c.Data(200, "` + fmime + `", ` + fmap[link] + `)
|
||||
|
||||
Reference in New Issue
Block a user