Disable cache

This commit is contained in:
我若为王 2024-12-05 14:52:01 +08:00
parent ab2e9e873c
commit c42da8e240
5 changed files with 7 additions and 1 deletions

View File

@ -7,7 +7,10 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`c3`](https://developers.cloudflare.com/pages/get-started/c3). # Docker部署教程
```
docker run -d -p 3000:3000 ghcr.io/ilay1678/alipan-tv-token:latest
```
# Cloudflare Pages 部署教程 # Cloudflare Pages 部署教程

BIN
bun.lockb Normal file

Binary file not shown.

View File

@ -21,6 +21,7 @@ export async function GET(request, { params }) {
const tokenResponse = await fetch('http://api.extscreen.com/aliyundrive/v3/token', { const tokenResponse = await fetch('http://api.extscreen.com/aliyundrive/v3/token', {
method: 'POST', method: 'POST',
headers: headers, headers: headers,
next: { revalidate: 0 }, // Disable cache
body: JSON.stringify(sendData) body: JSON.stringify(sendData)
}); });

View File

@ -6,6 +6,7 @@ export async function POST() {
const response = await fetch('http://api.extscreen.com/aliyundrive/qrcode', { const response = await fetch('http://api.extscreen.com/aliyundrive/qrcode', {
method: 'POST', method: 'POST',
headers: { 'Content-Type': 'application/json' }, headers: { 'Content-Type': 'application/json' },
next: { revalidate: 0 }, // Disable cache
body: JSON.stringify({ body: JSON.stringify({
scopes: ["user:base", "file:all:read", "file:all:write"].join(','), scopes: ["user:base", "file:all:read", "file:all:write"].join(','),
width: 500, width: 500,

View File

@ -19,6 +19,7 @@ export async function POST(request) {
const response = await fetch('http://api.extscreen.com/aliyundrive/v3/token', { const response = await fetch('http://api.extscreen.com/aliyundrive/v3/token', {
method: 'POST', method: 'POST',
next: { revalidate: 0 }, // Disable cache
headers: headers, headers: headers,
body: JSON.stringify(sendData) body: JSON.stringify(sendData)
}); });