Skip to content

Commit 6cf6dde

Browse files
committed
Revert "add public to cache-control header"
This reverts commit b3bb95e.
1 parent b3bb95e commit 6cf6dde

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

api/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export default async (req, res) => {
6565

6666
res.setHeader(
6767
"Cache-Control",
68-
`public, max-age=${
68+
`max-age=${
6969
cacheSeconds / 2
7070
}, s-maxage=${cacheSeconds}, stale-while-revalidate=${CONSTANTS.ONE_DAY}`,
7171
);

tests/api.test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ describe("Test /api/", () => {
149149
["Content-Type", "image/svg+xml"],
150150
[
151151
"Cache-Control",
152-
`public, max-age=${CONSTANTS.FOUR_HOURS / 2}, s-maxage=${
152+
`max-age=${CONSTANTS.FOUR_HOURS / 2}, s-maxage=${
153153
CONSTANTS.FOUR_HOURS
154154
}, stale-while-revalidate=${CONSTANTS.ONE_DAY}`,
155155
],
@@ -164,7 +164,7 @@ describe("Test /api/", () => {
164164
["Content-Type", "image/svg+xml"],
165165
[
166166
"Cache-Control",
167-
`public, max-age=7500, s-maxage=${15000}, stale-while-revalidate=${
167+
`max-age=7500, s-maxage=${15000}, stale-while-revalidate=${
168168
CONSTANTS.ONE_DAY
169169
}`,
170170
],
@@ -190,7 +190,7 @@ describe("Test /api/", () => {
190190
["Content-Type", "image/svg+xml"],
191191
[
192192
"Cache-Control",
193-
`public, max-age=${CONSTANTS.ONE_DAY / 2}, s-maxage=${
193+
`max-age=${CONSTANTS.ONE_DAY / 2}, s-maxage=${
194194
CONSTANTS.ONE_DAY
195195
}, stale-while-revalidate=${CONSTANTS.ONE_DAY}`,
196196
],
@@ -206,7 +206,7 @@ describe("Test /api/", () => {
206206
["Content-Type", "image/svg+xml"],
207207
[
208208
"Cache-Control",
209-
`public, max-age=${CONSTANTS.FOUR_HOURS / 2}, s-maxage=${
209+
`max-age=${CONSTANTS.FOUR_HOURS / 2}, s-maxage=${
210210
CONSTANTS.FOUR_HOURS
211211
}, stale-while-revalidate=${CONSTANTS.ONE_DAY}`,
212212
],
@@ -221,7 +221,7 @@ describe("Test /api/", () => {
221221
["Content-Type", "image/svg+xml"],
222222
[
223223
"Cache-Control",
224-
`public, max-age=${CONSTANTS.FOUR_HOURS / 2}, s-maxage=${
224+
`max-age=${CONSTANTS.FOUR_HOURS / 2}, s-maxage=${
225225
CONSTANTS.FOUR_HOURS
226226
}, stale-while-revalidate=${CONSTANTS.ONE_DAY}`,
227227
],

0 commit comments

Comments
 (0)