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
All checks were successful
Docker Deploy / build-and-push (push) Successful in 2m50s
passed :/
This commit is contained in:
@@ -30,8 +30,4 @@ export default defineConfig({
|
|||||||
adapter: node({
|
adapter: node({
|
||||||
mode: "standalone",
|
mode: "standalone",
|
||||||
}),
|
}),
|
||||||
|
|
||||||
security: {
|
|
||||||
checkOrigin: false,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -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) {
|
||||||
|
|||||||
@@ -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 });
|
||||||
|
|||||||
Reference in New Issue
Block a user