I'm specifying some devServer options in Storybook's webpack config:
Object.assign(storybookBaseConfig, {
devServer: {
headers: { 'Access-Control-Allow-Origin': '*' }
}
});
When running the storybook server, the headers are not included:
➜ component-library git:(master) ✗ curl -v http://localhost:6006/ 09:57:18
* Trying ::1...
* Connected to localhost (::1) port 6006 (#0)
> GET / HTTP/1.1
> Host: localhost:6006
> User-Agent: curl/7.49.1
> Accept: */*
>
< HTTP/1.1 200 OK
< X-Powered-By: Express
< Content-Type: text/html; charset=utf-8
< Content-Length: 1228
< ETag: W/"4cc-bRBT7YfeEe5YUtIAIwEt+w"
< Date: Wed, 14 Dec 2016 08:57:29 GMT
< Connection: keep-alive
<
<!DOCTYPE html>
We are using the webpack-dev-middleware.
I am happy to expose an way to get config for this.
I suggest to use a config field called devMiddlewareOptions.
Here's related place you should look at it: https://github.com/storybooks/react-storybook/blob/master/src/server/middleware.js#L24
We are open for PRs.
Is there any documentation on how to use the feature closed with the #723 pull request?
Most helpful comment
Is there any documentation on how to use the feature closed with the #723 pull request?