summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorrealtradam <[email protected]>2024-05-22 14:58:01 -0400
committerrealtradam <[email protected]>2024-05-22 14:58:01 -0400
commit2330eb25d958df5a8e15bcc9f452ac703323d159 (patch)
tree34cf6eeb36b9fbc25164b85765c3cf23753f39ee /src
parent80d64e04441ced7caecd238ae232e749d8e0dddf (diff)
downloadmalcz.com-2330eb25d958df5a8e15bcc9f452ac703323d159.tar.gz
malcz.com-2330eb25d958df5a8e15bcc9f452ac703323d159.zip
fix auth
Diffstat (limited to 'src')
-rw-r--r--src/components/Layout.jsx8
-rw-r--r--src/routes/index.jsx6
2 files changed, 8 insertions, 6 deletions
diff --git a/src/components/Layout.jsx b/src/components/Layout.jsx
index 79e7813..9aac935 100644
--- a/src/components/Layout.jsx
+++ b/src/components/Layout.jsx
@@ -12,10 +12,10 @@ export default function Layout ({userData})
// so the app would be broken when served on the isolated domain
const domain = window.location.host;
console.log(domain);
- if(domain === "localhost:3000")
- {
- window.location.replace("http://127.0.0.1:3000");
- }
+ //if(domain === "localhost:3000")
+ //{
+ // window.location.replace("http://127.0.0.1:3000");
+ //}
return (
<>
diff --git a/src/routes/index.jsx b/src/routes/index.jsx
index 1b778ef..df46102 100644
--- a/src/routes/index.jsx
+++ b/src/routes/index.jsx
@@ -9,9 +9,11 @@ import Layout from "../components/Layout";
export default function index()
{
const [userData, setUserData] = useState({});
- const url = "/api/v1/auth/data";
+ const url = "http://localhost:3000/api/v1/auth/data";
useEffect(() => {
- fetch(url).then((response) => {
+ fetch(url, {
+ credentials: "include"
+}).then((response) => {
if(response.ok) {
return response.json();
}