Skip to content

armgit / my-yt

Public Imported from GitHub
0

A clean and minimal youtube frontend, without all the ads and whistles

JavaScript

chore: cleanup

Christian Feif3d8b4070d5e
diff --git a/lib/server.js b/lib/server.js
index 3861b22..3d04610 100644
--- a/lib/server.js
+++ b/lib/server.js
@@ -247,8 +247,7 @@ function watchVideoHandler(req, res, repo) {
}
}
res.setHeader("content-type", contentType)
- // bust cache
- res.setHeader('cache-control', 'public, max-age=0')
+
const stat = fs.statSync(location)
let contentLength = stat.size
@@ -358,7 +357,6 @@ async function reclaimDiskSpaceHandler(req, res, repo) {
}
function captionsHandler(req, res) {
- // return vtt file of video
const captionsPath = './data' + req.url.replace('captions', 'videos') + '.en.vtt'
console.log(captionsPath)
if (!fs.existsSync(captionsPath)) {