@accelerated-agency/visual-editor 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vite.js +3 -1
- package/package.json +1 -1
package/dist/vite.js
CHANGED
|
@@ -1970,7 +1970,9 @@ function createVisualEditorMiddleware(options) {
|
|
|
1970
1970
|
});
|
|
1971
1971
|
const responseContentType = upstream.headers.get("content-type") || "";
|
|
1972
1972
|
const isHtmlResponse = responseContentType.includes("text/html");
|
|
1973
|
-
|
|
1973
|
+
const secFetchDest = (req.headers?.["sec-fetch-dest"] || "").toLowerCase();
|
|
1974
|
+
const isNavigationRequest = secFetchDest === "iframe" || secFetchDest === "document" || secFetchDest === "";
|
|
1975
|
+
if (!isHtmlResponse || !isNavigationRequest) {
|
|
1974
1976
|
const binary = Buffer.from(await upstream.arrayBuffer());
|
|
1975
1977
|
res.statusCode = upstream.status;
|
|
1976
1978
|
if (responseContentType) {
|