Skip to content

Commit

Permalink
frontend auth setup
Browse files Browse the repository at this point in the history
  • Loading branch information
ArslanKamchybekov committed Sep 11, 2024
1 parent 51cd861 commit 258fdaf
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 7 deletions.
34 changes: 31 additions & 3 deletions frontend/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,32 @@
/** @type {import('next').NextConfig} */
const nextConfig = {};

export default nextConfig;
const nextConfig = {
async headers() {
return [
{
// Apply these headers to all routes in your application
source: '/(.*)',
headers: [
{
key: 'Access-Control-Allow-Credentials',
value: 'true',
},
{
key: 'Access-Control-Allow-Origin',
value: '*', // Replace with your allowed origin
},
{
key: 'Access-Control-Allow-Methods',
value: 'GET,OPTIONS,PATCH,DELETE,POST,PUT',
},
{
key: 'Access-Control-Allow-Headers',
value: 'X-CSRF-Token, X-Requested-With, Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, X-Api-Version, Authorization',
},
],
},
];
},
};

export default nextConfig;

9 changes: 5 additions & 4 deletions frontend/src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@

import React from 'react';

const Home: React.FC = () => {

return (
<div>
<h1>Home</h1>
</div>
<>
</>
);
}

Expand Down
10 changes: 10 additions & 0 deletions frontend/src/pages/signin.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

const SignIn: React.FC = () => {
return (
<>
<h1>Sign In</h1>
</>
);
}

export default SignIn;
10 changes: 10 additions & 0 deletions frontend/src/pages/signup.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

const SignUp: React.FC = () => {
return (
<>
<h1>Sign Up</h1>
</>
);
}

export default SignUp;

0 comments on commit 258fdaf

Please sign in to comment.