Skip to content

Commit

Permalink
fix: fix CORS issue for public profile (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
vthwang authored Sep 15, 2023
1 parent 18fbc07 commit 2aa557e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/routes/profiles.$profileId.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,11 @@ export const loader = async ({ params }) => {
{ status: 404 }
)
}
return JSON.parse(profile.profile)
return json(JSON.parse(profile.profile), {
headers: {
'Content-Type': 'application/json',
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Methods': 'GET'
}
})
}

1 comment on commit 2aa557e

@vercel
Copy link

@vercel vercel bot commented on 2aa557e Sep 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.