mirror of
https://github.com/ArthurDanjou/website-old.git
synced 2026-01-14 20:19:35 +01:00
Add headers
This commit is contained in:
@@ -25,24 +25,28 @@ export default defineComponent({
|
||||
setup() {
|
||||
const { $axios } = useContext()
|
||||
|
||||
const headers = {
|
||||
'Access-Control-Allow-Origin': '*',
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
|
||||
const loginWithGithub = () => {
|
||||
return $axios.get('/auth/github',{
|
||||
headers: {
|
||||
'Access-Control-Allow-Origin': '*'
|
||||
}
|
||||
}).then((response) => {
|
||||
return $axios.get('/auth/github',{headers})
|
||||
.then((response) => {
|
||||
console.log(response)
|
||||
})
|
||||
}
|
||||
|
||||
const loginWithGoogle = () => {
|
||||
return $axios.get('/auth/google').then((response) => {
|
||||
return $axios.get('/auth/google', {headers})
|
||||
.then((response) => {
|
||||
console.log(response)
|
||||
})
|
||||
}
|
||||
|
||||
const loginWithTwitter = () => {
|
||||
return $axios.get('/auth/twitter').then((response) => {
|
||||
return $axios.get('/auth/twitter', {headers})
|
||||
.then((response) => {
|
||||
console.log(response)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user