Skip to content

Conversation

@psibean
Copy link
Contributor

@psibean psibean commented May 4, 2025

This is just a proof of concept that attemps to remove direct dependencies on express from csrf-csrf. A TypeScript example using tinyhttp has been included to demonstrate that it works there, additionally the existing React example has been updated to make use of the adjusted typings.

This is just a draft, it's an experiment, it's up here for feedback / testing / reference.

This PR contains breaking changes so should not be merged at this current time.

This is a PoC for issue #67

Still depends on cookie-parser for both express and tinyhttp. I considered removing cookie-parser and handling the cookie parsing myself, it seems a bit silly that this isn't something that's centrally available from within Node already.

@psibean psibean force-pushed the feat/improve-framework-agnostic-support branch from fc117f7 to d670d56 Compare May 4, 2025 06:52
This attempts to remove explicit Express dependencies from
csrf-csrf. TypeScript support updated to make use of generics
which rely on the underlying Node types instead.
@psibean psibean force-pushed the feat/improve-framework-agnostic-support branch from d670d56 to a327a02 Compare May 4, 2025 07:21
@psibean psibean added feature poc Proof of concept labels May 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature poc Proof of concept

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant