request.state is not persisted between middlewares.
See original GitHub issueI am not finding my request.state.xyz = 1
on the next middleware execution. Bug?
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Express middleware, changes to request object do not persist
I've tried several things already but seem to keep having the same issue. Soon as the middleware is left it looks like the...
Read more >5.x API - Express.js
Returns middleware that only parses JSON and only looks at requests where the Content-Type header matches the type option. This parser accepts any...
Read more >Persisting state locally - Human Redux
It is not the application itself. When I talk about persisting "state" locally in this chapter, I'm talking entirely about #2.
Read more >Redux: Persisting the State to the Local Storage - Egghead.io
We will learn how to use store.subscribe() to efficiently persist some of the app's state to localStorage and restore it after a refresh....
Read more >Using Redux-Persist to Store Your State in LocalStorage | by ...
You will need to import {compose} and {createStore} from 'redux', as well as {applyMiddleware} if you are using any other middleware. You will ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
As a side effect, that’d also resolve #545
Good point yup - it’s not being initialized based on what’s in the scope.
We should tweak things here, so that it has
__getattr__
,__setattr__
, and__delattr__
methods, each of which actually get/set/delete keys within the scope[‘state’] dictionary.