Skip to content

Commit

Permalink
[fix][0.0.2.1]fixing cors
Browse files Browse the repository at this point in the history
  • Loading branch information
Mhirii committed Aug 6, 2023
1 parent a7ab0c7 commit 3affd30
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion frontend/src/api/axios.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ const accessToken = "";

export default axios.create({
baseURL: "http://localhost:5000",
withCredentials: true,
// withCredentials: true,
headers: {
Authorization: accessToken,
"Access-Control-Allow-Origin": "*",
},
});

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Task/TaskBoardRender.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const TaskBoardRender: React.FC<Props> = ({view}) => {
"Access-Control-Allow-Origin": "*",
Authorization: `Bearer ${accessToken}`
},
withCredentials: true
// withCredentials: true
}

// useEffect(() => {
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/routes/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function axiosLogin(username: string, password: string): AxiosResponse<an
'Content-Type': 'application/json',
"Access-Control-Allow-Origin": "*",
},
withCredentials: true
// withCredentials: true
}
)
}
Expand Down Expand Up @@ -77,7 +77,7 @@ export default function LoginPage() {
"Access-Control-Allow-Origin": "*",
Authorization: `Bearer ${accessToken}`
},
withCredentials: true,
// withCredentials: true,
mode: 'no-cors',
}

Expand Down

1 comment on commit 3affd30

@vercel
Copy link

@vercel vercel bot commented on 3affd30 Aug 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deployment failed with the following error:

If `rewrites`, `redirects`, `headers`, `cleanUrls` or `trailingSlash` are used, then `routes` cannot be present.

Learn More: https://vercel.link/mix-routing-props

Please sign in to comment.