We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b2276b4 commit fb0e772Copy full SHA for fb0e772
src/runtime/internal/static.ts
@@ -36,6 +36,13 @@ export default eventHandler((event) => {
36
withLeadingSlash(withoutTrailingSlash(parseURL(event.path).pathname))
37
);
38
39
+ for (const encoding of Object.values(EncodingMap)) {
40
+ if (getAsset(id + encoding)) {
41
+ appendResponseHeader(event, "Vary", "Accept-Encoding");
42
+ break;
43
+ }
44
45
+
46
let asset: PublicAsset | undefined;
47
48
const encodingHeader = String(
@@ -49,9 +56,6 @@ export default eventHandler((event) => {
49
56
.sort(),
50
57
"",
51
58
];
52
- if (encodings.length > 1) {
53
- appendResponseHeader(event, "Vary", "Accept-Encoding");
54
- }
55
59
60
for (const encoding of encodings) {
61
for (const _id of [id + encoding, joinURL(id, "index.html" + encoding)]) {
0 commit comments