Skip to content

Commit

Permalink
Merge branch 'main' into mschwager-blog-rules
Browse files Browse the repository at this point in the history
  • Loading branch information
mschwager authored Jan 16, 2024
2 parents 2ea118b + 90561e1 commit e73d0fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion javascript/apollo-graphql/v4-csrf-prevention.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// OK: Lacks 'csrfPrevention: true', but on v4 this option is false by default
// OK: Lacks 'csrfPrevention: true', but on v4 this option is true by default
//ok: v4-csrf-prevention
const apollo_server_1 = new ApolloServer({
typeDefs,
Expand Down
3 changes: 3 additions & 0 deletions javascript/apollo-graphql/v4-csrf-prevention.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ rules:
description: "CSRF protection disabled"
references:
- https://www.apollographql.com/docs/apollo-server/v3/security/cors/#preventing-cross-site-request-forgery-csrf
fix-regex:
regex: 'csrfPrevention:\s*false'
replacement: "csrfPrevention: true"

patterns:
- pattern: |
Expand Down

0 comments on commit e73d0fd

Please sign in to comment.