🐛 The bug
Based on this, the only way to not have the proxy token shoved into the Nuxt payload is to not have the secret set, but because it is auto-generated in dev, I can't actually test the payload properly.
The actual issue is that I'd like to calculate an etag for the response via a Nitro plugin, but because the proxy token is being included in the payload for every request, each hash is different. I had assumed that just setting proxy: false for the one script I was including would turn off this inclusion, but it does not.
🛠️ To reproduce
https://stackblitz.com/edit/nuxt-starter-rxyuphdo?file=nuxt.config.ts
🌈 Expected behavior
Don't include the proxy token if it isn't going to be used (or warn that the environment variable isn't set). If it needs to be a flag set at a higher level, that's fine with me.
Obviously, just not including the NUXT_SCRIPTS_PROXY_SECRET for production builds should work fine without any changes, but it is going to yell at me and still not work properly for dev.
ℹ️ Additional context
No response
🐛 The bug
Based on this, the only way to not have the proxy token shoved into the Nuxt payload is to not have the secret set, but because it is auto-generated in dev, I can't actually test the payload properly.
The actual issue is that I'd like to calculate an
etagfor the response via a Nitro plugin, but because the proxy token is being included in the payload for every request, each hash is different. I had assumed that just settingproxy: falsefor the one script I was including would turn off this inclusion, but it does not.🛠️ To reproduce
https://stackblitz.com/edit/nuxt-starter-rxyuphdo?file=nuxt.config.ts
🌈 Expected behavior
Don't include the proxy token if it isn't going to be used (or warn that the environment variable isn't set). If it needs to be a flag set at a higher level, that's fine with me.
Obviously, just not including the
NUXT_SCRIPTS_PROXY_SECRETfor production builds should work fine without any changes, but it is going to yell at me and still not work properly for dev.ℹ️ Additional context
No response