Skip to content

Commit

Permalink
added cors origin
Browse files Browse the repository at this point in the history
  • Loading branch information
WhiteSnek committed Apr 27, 2024
1 parent 8a2c575 commit 3f169bb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion backend/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import cors from 'cors'
const app = express();

app.use(cors({
origin: process.env.CORS_ORIGIN,
origin: process.env.NODE_ENV === 'production' ? process.env.PRODUCTION_CORS_ORIGIN : process.env.LOCAL_CORS_ORIGIN,
credentials: true
}))

Expand Down
1 change: 1 addition & 0 deletions frontend/src/pages/Login.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ const Login = () => {
const errorMessage = error.response.data.match(
/<pre>Error: (.*?)<br>/
)[1];
console.log(errorMessage)
}
};
const togglePasswordVisibility = () => {
Expand Down

0 comments on commit 3f169bb

Please sign in to comment.