Skip to content

Commit

Permalink
Modifide Heades
Browse files Browse the repository at this point in the history
  • Loading branch information
scottyzen committed Oct 3, 2021
1 parent faa0ac0 commit 97405f8
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 30 deletions.
16 changes: 11 additions & 5 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,24 @@
[headers.values]
Cache-Control = "public, max-age=2592000"

# [[headers]]
# for = "/*"
# [headers.values]
# Access-Control-Allow-Origin = "*"
# Access-Control-Allow-Headers = "Content-Type"
[[headers]]
for = "/*"
[headers.values]
Access-Control-Allow-Origin = "*"
Access-Control-Allow-Headers = "Content-Type"
# X-XSS-Protection = "1; mode=block"
# Referrer-Policy = "no-referrer"
# X-Content-Type-Options = "nosniff"
# Strict-Transport-Security = "max-age=15780000; includeSubDomains; preload"
# Feature-Policy = "geolocation 'none'; midi 'none'; sync-xhr 'none'; microphone 'none'; camera 'none'; magnetometer 'none'; gyroscope 'none'; speaker 'none'; fullscreen 'none'; payment 'none'"
# Content-Security-Policy = "default-src * 'unsafe-inline' 'unsafe-eval'; script-src * 'unsafe-inline' 'unsafe-eval'; connect-src * 'unsafe-inline'; img-src * data: blob: 'unsafe-inline'; frame-src *; style-src * 'unsafe-inline'"

[[headers]]
for = "/_nuxt/*"
[headers.values]
Cache-Control = "public, max-age=365000000"
Access-Control-Allow-Origin = "*"
Access-Control-Allow-Headers = "Content-Type"

[[redirects]]
from = "/*"
Expand Down
49 changes: 24 additions & 25 deletions pages/login.vue
Original file line number Diff line number Diff line change
@@ -1,32 +1,31 @@
<template>
<div class="container">
<h1 class="py-12 text-3xl text-center">Login</h1>
<pre class="mb-12 text-xs">{{ this.$auth.user }}</pre>
<UserAuthForm buttonText="Login" :submitForm="loginUser" />
</div>
<div class="container">
<h1 class="py-12 text-3xl text-center">Login</h1>
<UserAuthForm buttonText="Login" :submitForm="loginUser" />
</div>
</template>

<script>
import login from "~/gql/mutations/login";
import login from '~/gql/mutations/login'
export default {
methods: {
async loginUser(logininfo) {
console.log("Loggin in");
try {
const variables = {
username: logininfo.email,
password: logininfo.password,
};
const data = await this.$graphql.default.request(login, variables);
console.log(data);
} catch (error) {
console.error(JSON.stringify(error, undefined, 2));
}
},
},
created() {
// console.dir(this.$auth)
},
};
methods: {
async loginUser(logininfo) {
console.log('Loggin in')
try {
const variables = {
username: logininfo.email,
password: logininfo.password
}
const data = await this.$graphql.default.request(login, variables)
console.log(data)
} catch (error) {
console.error(JSON.stringify(error, undefined, 2))
}
}
},
created() {
// console.dir(this.$auth)
}
}
</script>

0 comments on commit 97405f8

Please sign in to comment.