Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to disable the CSRF protection on a specific route #867

Merged
merged 4 commits into from
Feb 1, 2021

Conversation

LoicPoullain
Copy link
Member

@LoicPoullain LoicPoullain commented Feb 1, 2021

Issue

Resolves #859.

Solution and steps

  • Add the csrf option in @UseSessions.
  • Add the csrf option in @JWT

Checklist

  • Add/update/check docs (code comments and docs/ folder).
  • Add/update/check tests.
  • Update/check the cli generators.

@LoicPoullain LoicPoullain added this to Work In Progress in Issue tracking via automation Feb 1, 2021
@LoicPoullain LoicPoullain mentioned this pull request Feb 1, 2021
5 tasks
@codecov-io
Copy link

codecov-io commented Feb 1, 2021

Codecov Report

Merging #867 (a41dcb0) into v2-1-0 (788f098) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           v2-1-0     #867      +/-   ##
==========================================
- Coverage   98.91%   98.89%   -0.02%     
==========================================
  Files          82       82              
  Lines        1654     1722      +68     
  Branches      398      424      +26     
==========================================
+ Hits         1636     1703      +67     
- Misses         18       19       +1     
Impacted Files Coverage Δ
packages/core/src/sessions/use-sessions.hook.ts 100.00% <100.00%> (ø)
packages/core/src/core/config/utils.ts 81.81% <0.00%> (-7.08%) ⬇️
packages/core/src/core/routes/utils.ts 100.00% <0.00%> (ø)
packages/core/src/common/hooks/log.hook.ts 100.00% <0.00%> (ø)
packages/core/src/express/send-response.ts 100.00% <0.00%> (ø)
packages/core/src/sessions/read-session.ts 100.00% <0.00%> (ø)
packages/core/src/core/http/http-methods.ts 100.00% <0.00%> (ø)
packages/core/src/common/utils/escape-prop.ts 100.00% <0.00%> (ø)
packages/core/src/common/utils/render.util.ts 100.00% <0.00%> (ø)
packages/core/src/core/routes/get-response.ts 100.00% <0.00%> (ø)
... and 18 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 788f098...a41dcb0. Read the comment docs.

@LoicPoullain LoicPoullain merged commit 385d4f7 into v2-1-0 Feb 1, 2021
Issue tracking automation moved this from Work In Progress to Done / Closed This Release Feb 1, 2021
@LoicPoullain LoicPoullain deleted the use-sessions-disable-csrf branch February 1, 2021 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Issue tracking
  
Done / Closed This Release
Development

Successfully merging this pull request may close these issues.

None yet

2 participants