Skip to content
This repository has been archived by the owner on Sep 14, 2022. It is now read-only.

throw error when the user repeatedly call csurf in same middleware #230

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Yu-Jack
Copy link

@Yu-Jack Yu-Jack commented Nov 25, 2020

I think and think over again in PR-228 and PR-229.
There are maybe few users repeatedly called csurf({cookie: true}) with same middleware.
So, I think I just warn this situation for now.
In the future, we maybe could throw error instead of warning.

@Yu-Jack Yu-Jack changed the title Patch 1 Warn the user to repeatedly call csurf with same middleware Nov 25, 2020
@Yu-Jack Yu-Jack marked this pull request as ready for review November 26, 2020 14:55
@dougwilson dougwilson added the pr label Dec 13, 2020
index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
@Yu-Jack Yu-Jack changed the title Warn the user to repeatedly call csurf with same middleware throw error when the user repeatedly call csurf in same middleware Dec 15, 2020
@Yu-Jack
Copy link
Author

Yu-Jack commented Dec 30, 2020

@dougwilson Is it okay?

Copy link
Author

@Yu-Jack Yu-Jack left a comment

Choose a reason for hiding this comment

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

I've fixed the code according to the comments.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants