This commit is contained in:
2021-07-08 23:42:51 +02:00
parent 02daf1485f
commit 1d79e85701
2 changed files with 8 additions and 7 deletions

View File

@@ -2,7 +2,12 @@ import {NuxtOptionsModule} from "@nuxt/types/config/module";
const axios = { const axios = {
credentials: true, credentials: true,
baseURL: 'https://api.arthurdanjou.fr' baseURL: 'https://api.arthurdanjou.fr',
headers: {
'Access-Control-Allow-Origin': 'https://arthurdanjou.fr',
'Content-Type': 'application/json',
'Accept': '*/*'
},
} }
const i18n = { const i18n = {

View File

@@ -25,7 +25,7 @@
<button <button
@click.prevent="handleForm" @click.prevent="handleForm"
v-if="form.message && form.message.length > 0" v-if="form.message && form.message.length > 0"
class="button flex items-center justify-center px-8 py-1 font-bold bg-gray-100 dark:bg-gray-700 text-gray-900 dark:text-gray-100 rounded hover:bg-gray-300 duration-300" class="button flex items-center justify-center px-8 py-1 font-bold bg-gray-100 dark:bg-gray-700 hover:dark:bg-gray-800 text-gray-900 dark:text-gray-100 rounded hover:bg-gray-300 duration-300"
> >
{{ $t('guestbook.sign') }} {{ $t('guestbook.sign') }}
</button> </button>
@@ -46,7 +46,7 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import {computed, defineComponent, ref, useContext} from "@nuxtjs/composition-api"; import {defineComponent, ref, useContext} from "@nuxtjs/composition-api";
import {GuestbookForm} from "~/types/types"; import {GuestbookForm} from "~/types/types";
export default defineComponent({ export default defineComponent({
@@ -56,10 +56,6 @@ export default defineComponent({
const login = async (driver: 'github' | 'google' | 'twitter') => { const login = async (driver: 'github' | 'google' | 'twitter') => {
const response = await $axios.get(`/auth/${driver}`, { const response = await $axios.get(`/auth/${driver}`, {
headers: {
'Access-Control-Allow-Origin': '*',
'Content-Type': 'application/json'
},
proxy: { proxy: {
protocol: 'https', protocol: 'https',
host: 'https://api.arthurdanjou.fr', host: 'https://api.arthurdanjou.fr',