Merge branch 'main' of github.com:spencerwooo/onedrive-vercel-index into stale-while-revalidate-59

This commit is contained in:
spencerwooo
2022-02-13 19:17:04 +08:00
10 changed files with 241 additions and 40 deletions
+3
View File
@@ -160,6 +160,9 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
// Fetch password from remote file content
if (authTokenPath !== '') {
// Don't server cached response for password protected folders
res.setHeader('Cache-Control', 'no-cache')
try {
const token = await axios.get(`${apiConfig.driveApi}/root${encodePath(authTokenPath)}`, {
headers: { Authorization: `Bearer ${accessToken}` },