cors trial 999

This commit is contained in:
taskylizard 2023-11-04 23:32:30 +05:30
parent 19aeb01801
commit f3351cabc4
No known key found for this signature in database
GPG Key ID: 5CABA3D642DDC497

View File

@ -24,6 +24,8 @@ function getFeedbackOption(value: string) {
}
export default defineEventHandler(async (event) => {
if (event.headers.get("sec-fetch-mode") === "cors") return sendNoContent(event, 200);
const { message, contactEmail, feedbackType } = await readBody<Feedback>(event);
const env = useRuntimeConfig(event);