Replies: 2 comments 3 replies
-
What are the default global middlewares? Does that include Anti-CSRF? You wouldn't want to run that on certain API Routes, such as web hooks, for instance. |
Beta Was this translation helpful? Give feedback.
3 replies
-
Hi, |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Problem
Currently we only support http middleware for queries/mutations. This results the following inelegant code:
and for api routes
Solution
ctx
param to getServerSideProps and custom api routes. (This is the same middleware provided object currently given as second argument to queries/mutations)New for pages:
ctx
added to the provide context objectNew for api routes:
ctx
added as a third parameterTBD:
Beta Was this translation helpful? Give feedback.
All reactions