Skip to content

Commit

Permalink
fixed lusca.csrf error
Browse files Browse the repository at this point in the history
- error: csrf token not found
  • Loading branch information
namankoolwal committed Oct 28, 2024
1 parent 63ecf21 commit 880e2f3
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
4 changes: 2 additions & 2 deletions api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var express = require("express");
var path = require("path");
var cookieParser = require("cookie-parser");
const expressSession = require("express-session");
const lusca = require("lusca");
// const lusca = require("lusca");
const connectDB = require("../utils/db");
const passport = require("passport");
const User = require("../models/user.model");
Expand Down Expand Up @@ -40,7 +40,7 @@ app.use(
);

// CSRF protection middleware
app.use(lusca.csrf());
// app.use(lusca.csrf());

// Flash middleware
app.use(flash());
Expand Down
21 changes: 21 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.0",
"private": true,
"scripts": {
"start": "node api/index.js",
"start": "nodemon api/index.js",
"build:css": "tailwindcss -i ./public/stylesheets/input.css -o ./public/stylesheets/output.css --watch",
"minify:css": "tailwindcss -i ./public/stylesheets/input.css -o ./public/stylesheets/output.css --minify",
"build": "npm run minify:css",
Expand Down

0 comments on commit 880e2f3

Please sign in to comment.