Skip to content

Commit b51aaf8

Browse files
authored
Merge branch 'main' into dependabot/github_actions/github-actions-3a6c688003
2 parents 9846a40 + c2e9bf1 commit b51aaf8

File tree

6 files changed

+354
-375
lines changed

6 files changed

+354
-375
lines changed

http/package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

http/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"dependencies": {
2020
"@graphql-tools/merge": "9.0.24",
2121
"@graphql-tools/schema": "10.0.23",
22-
"graphql-yoga": "^5.13.4",
22+
"graphql-yoga": "^5.13.5",
2323
"dotenv": "^16.4.5",
2424
"uuid": "^11.1.0"
2525
},

index.mjs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import fetchWithTimeout from './utils/fetch-with-timeout.mjs';
2929
import { getNightbotResponse, useNightbotOnUrl } from './plugins/plugin-nightbot.mjs';
3030
import { getTwitchResponse } from './plugins/plugin-twitch.mjs';
3131
import { getLiteApiResponse, useLiteApiOnUrl } from './plugins/plugin-lite-api.mjs';
32+
import { getSpecialCache } from './plugins/plugin-use-cache-machine.mjs';
3233

3334
let dataAPI;
3435

@@ -84,11 +85,7 @@ async function graphqlHandler(request, env, ctx) {
8485
//return new Response(JSON.stringify({}), responseOptions);
8586
}
8687

87-
let specialCache = '';
88-
const contentType = request.headers.get('content-type');
89-
if (!contentType || !contentType.startsWith('application/json')) {
90-
specialCache = 'application/json';
91-
}
88+
const specialCache = getSpecialCache(request);
9289

9390
let key;
9491
// Check the cache service for data first - If cached data exists, return it

0 commit comments

Comments
 (0)