Closed harshithjv closed 7 years ago
The way you had in the first pass it is the right one. Having devServer key inside the main grommet toolbox config.
I'm not sure why this is not working for you, I've just tested it and it works for me.
Can you provide extra information here? Like the version of toolbox you have, version of node, things like that.
Also can you debug inside node_modules/grommet-toolbox/lib/gulp-tasks-dev.js
?
https://github.com/grommet/grommet-toolbox/blob/master/src/gulp-tasks-dev.js#L65
If you here I do a deep assign of devServer key to the config for the dev server. it would be a good idea to put a console.log in your node_modules and see if the header is present.
Hey @alansouzati ,
Thanks for clarification. I debugged again.
It does not come up in inside dev-server wrapper url, i.e., 'http://localhost:9000/webpack-dev-server/' But available on direct loading of URls, i.e., http://localhost:9000 or http://localhost:9000/home
But applying headers within 'webpack' key won't work.
Would you mind raising an issue with webpack dev server? I believe there is nothing I could do on my end.
Closing the issue for now. Feel free to re-open it if you still feel there is something to fixed in the grommet toolbox side of things.
@alansouzati I don't its webpack issue.
I'm reopening the issue. have you tried it outside grommet-toolbox? can you provide extra information why you think this is not a webpack issue? there is nothing toolbox is doing apart from setting the header.
Can you provide extra information here?
Hey @harishithjv, thanks for all your collaboration with us. We will be cleaning up our backlog first week of January 2017 by closing unresponsive issues that haven't been active for at least 30 days.
If you would like this issue to remain open in our backlog, please comment to let us know. Thanks!
Backlog Grooming Jan 4, 2017 - Closing issue
I am trying to add headers to web page requests while developing. On file grommet-toolbox.config.js I tried add:
I also tried to add devServer key directly, instead of embedding inside of webpack key, as mentioned in README instructions. But no luck.
This is very much needed for our use-case. Now I have to resort to running third party server like Django or Flask just to redirect Grommet webapp URL with required headers.