fix(striker-ui): apply withCredentials to all API requests

main
Tsu-ba-me 2 years ago
parent 8d343e5cca
commit 4dece7aaf8
  1. 6
      striker-ui/components/GatePanel.tsx
  2. 1
      striker-ui/lib/api.ts

@ -28,11 +28,7 @@ const GatePanel: FC = () => {
setIsSubmitting(true);
api
.post(
'/auth/login',
{ username, password },
{ withCredentials: true },
)
.post('/auth/login', { username, password })
.then(() => {
const url = returnTo ? String(returnTo) : '/';

@ -7,6 +7,7 @@ const api = new Axios({
transformRequest: axios.defaults.transformRequest,
transformResponse: axios.defaults.transformResponse,
validateStatus: (status) => status < 400,
withCredentials: true,
});
export default api;

Loading…
Cancel
Save