Fixed sameOrigin. Turns out I just had it as text and not json being
All checks were successful
Docker Deploy / build-and-push (push) Successful in 2m50s

passed :/
This commit is contained in:
2026-03-07 00:35:39 -07:00
parent fa9d2700f2
commit 4c8105d263
3 changed files with 3 additions and 7 deletions

View File

@@ -30,8 +30,4 @@ export default defineConfig({
adapter: node({ adapter: node({
mode: "standalone", mode: "standalone",
}), }),
security: {
checkOrigin: false,
},
}); });

View File

@@ -105,9 +105,9 @@ const generatePDF = async () => {
const response = await fetch("/api/resume/generate", { const response = await fetch("/api/resume/generate", {
method: "POST", method: "POST",
headers: { headers: {
"Content-Type": "text/plain", "Content-Type": "application/json",
}, },
body: tomlContent.value, body: JSON.stringify({ toml: tomlContent.value }),
}); });
if (!response.ok) { if (!response.ok) {

View File

@@ -70,7 +70,7 @@ export const GET: APIRoute = async ({ request }) => {
export const POST: APIRoute = async ({ request }) => { export const POST: APIRoute = async ({ request }) => {
try { try {
const tomlContent = await request.text(); const { toml: tomlContent } = await request.json();
if (!tomlContent.trim()) { if (!tomlContent.trim()) {
return new Response("TOML content is required", { status: 400 }); return new Response("TOML content is required", { status: 400 });