Skip to content

Commit

Permalink
Fix Content Type
Browse files Browse the repository at this point in the history
  • Loading branch information
istarkov committed May 7, 2024
1 parent 8f53488 commit 7616435
Showing 1 changed file with 4 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
/* eslint-disable camelcase */
import {
type LoaderFunctionArgs,
type HeadersFunction,
redirect,
} from "@remix-run/server-runtime";
import { type LoaderFunctionArgs, redirect } from "@remix-run/server-runtime";
import { ReactSdkContext } from "@webstudio-is/react-sdk";
import { Page } from "../../../../__generated__/_index";
import {
Expand Down Expand Up @@ -59,12 +55,7 @@ export const loader = async (arg: LoaderFunctionArgs) => {
</ReactSdkContext.Provider>
);

return new Response(`<?xml version="1.0" encoding="UTF-8"?>\n${text}`);
};

export const headers: HeadersFunction = ({ loaderHeaders }) => {
return {
"Cache-Control": "public, max-age=0, must-revalidate",
"Content-Type": "application/xml",
};
return new Response(`<?xml version="1.0" encoding="UTF-8"?>\n${text}`, {
headers: { "Content-Type": "application/xml" },
});
};

0 comments on commit 7616435

Please sign in to comment.