stop serving cache for protected routes, close #425
This commit is contained in:
parent
0d329dee6d
commit
3254bfad35
1 changed files with 3 additions and 0 deletions
|
@ -160,6 +160,9 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
||||||
|
|
||||||
// Fetch password from remote file content
|
// Fetch password from remote file content
|
||||||
if (authTokenPath !== '') {
|
if (authTokenPath !== '') {
|
||||||
|
// Don't server cached response for password protected folders
|
||||||
|
res.setHeader('Cache-Control', 'no-cache')
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const token = await axios.get(`${apiConfig.driveApi}/root${encodePath(authTokenPath)}`, {
|
const token = await axios.get(`${apiConfig.driveApi}/root${encodePath(authTokenPath)}`, {
|
||||||
headers: { Authorization: `Bearer ${accessToken}` },
|
headers: { Authorization: `Bearer ${accessToken}` },
|
||||||
|
|
Loading…
Reference in a new issue