cross-request state pollution
See original GitHub issueEnvironment
- Operating System:
Windows_NT
- Node Version:
v14.19.1
- Nuxt Version:
2.16.0-27616340.013f051b
- Package Manager:
yarn@1.22.18
- Builder:
webpack
- User Config:
srcDir
,alias
,server
,bridge
,head
,serverMiddleware
,css
,styleResources
,plugins
,buildModules
,gtm
,modules
,postcss
,tailwindcss
,typescript
,sentry
,buefy
,image
,axios
,proxy
,render
,i18n
,router
,build
,serverHandlers
,devServerHandlers
- Runtime Modules:
@nuxt/image@0.6.2
,@nuxtjs/sentry@5.1.7
,nuxt-buefy@0.3.31
,@nuxtjs/axios@5.13.6
,@nuxtjs/proxy@2.1.0
,cookie-universal-nuxt@2.2.1
,@nuxtjs/i18n@7.2.2
,nuxt-sweetalert2@1.0.0
- Build Modules:
()
,@pinia/nuxt@0.3.0
,@nuxtjs/eslint-module@3.1.0
,@nuxtjs/style-resources@1.2.1
,@nuxtjs/gtm@2.4.0
,@nuxtjs/tailwindcss@4.2.1
,@nuxtjs/dotenv@1.4.1
,@nuxt/bridge@3.0.0-27639120.e7a7f9b
Reproduction
I cannot reproduce because this situation happens very comlex code base.
Describe the bug
Although cache-control: max-age=0, private is set in Response Header, nuxt caches this request and this response is returned to other users. Because of this, I am experiencing an info leak.
This only happening on ssr.
Additional context
Our project running in docker and AWS.
Logs
No response
Issue Analytics
- State:
- Created a year ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
Cross-request state pollution ? · Issue #146 - GitHub
I run into the classic cross-request state pollution scenario that is most often encountered when not using the stateFactory option.
Read more >Server-Side Rendering (SSR) - Vue.js
We call this cross-request state pollution. We can technically re-initialize all the JavaScript modules on each request, just like we do in browsers....
Read more >How to avoid cross-request state pollution problems when ...
In the production environment I can use node:vm to implement a sandbox to avoid cross-request state pollution but the development ...
Read more >Cross-State Air Pollution Rule (CSAPR) | US EPA
The Cross-State Air Pollution Rule (CSAPR), requires states to significantly improve air quality by reducing power plant emissions that ...
Read more >Cross-State Air Pollution Rule - SCDHEC
On August 25, 2017, the Department added Regulation 61-62.97, Cross-State Air Pollution Rule (CSAPR) Trading Program, to incorporate the EPA's CSAPR trading ...
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
The issue is that you are defining your state outside of the factory function:
That is why it is shared.
Although the factory function is called fresh each time, it returns the same object. The point of a factory function is to return a different object each time it’s called.
It shouldn’t be something you need to do. Both Nuxt + pinia should ensure this. Would you create a minimal reproduction so I can look into it further? 🙏