-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use store value as header #30
Comments
This issue as been imported as question since it does not respect proxy-module issue template. Only bug reports and feature requests stays open to reduce maintainers workload. |
@yaki4 Do not have access to the store here, you can take a look here nuxt/nuxt#2005 |
Hi! I have a problem, It's about this is my nuxt config
I can't see it in Network in Chrome. |
Could you please create a reproduction by using https://template.nuxtjs.org? |
Hi i would like to use a store value with onProxyReq.
But it seems that nuxt context or store is unavailable in proxy. Any ideas how to do it ?
I've tried req.body but it's undefined.
proxy: {
'/graphql': {
target: 'https://beautifulapigraph.com',
onProxyReq: function (proxyReq, req, res, options) {
proxyReq.setHeader('X-VAL', storeBasedValue)
}
}
},
The text was updated successfully, but these errors were encountered: