From d5c553b45f7f272f8544e2a10808d37ae0c09ce9 Mon Sep 17 00:00:00 2001 From: Arthur DANJOU Date: Mon, 5 Jul 2021 12:36:00 +0200 Subject: [PATCH] Change headers --- src/components/GuestBookForm.vue | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/src/components/GuestBookForm.vue b/src/components/GuestBookForm.vue index 4a6d009..92f97fb 100644 --- a/src/components/GuestBookForm.vue +++ b/src/components/GuestBookForm.vue @@ -53,21 +53,31 @@ export default defineComponent({ setup() { const { $axios, $sentry } = useContext() - const headers = { - 'Access-Control-Allow-Origin': '*', - 'Content-Type': 'application/json' - } - const loginWithGithub = () => { - $axios.get('/auth/github', {headers: headers}) + $axios.get('/auth/github', { + headers: { + 'Access-Control-Allow-Origin': '*', + 'Content-Type': 'application/json' + } + }) } const loginWithGoogle = () => { - return $axios.get('/auth/google', {headers}) + return $axios.get('/auth/google', { + headers: { + 'Access-Control-Allow-Origin': '*', + 'Content-Type': 'application/json' + } + }) } const loginWithTwitter = () => { - $axios.get('/auth/twitter', {headers}) + $axios.get('/auth/twitter', { + headers: { + 'Access-Control-Allow-Origin': '*', + 'Content-Type': 'application/json' + } + }) } const error = ref(false)