Skip to content
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

devServer options not used by server #650

Closed
doque opened this issue Dec 14, 2016 · 2 comments
Closed

devServer options not used by server #650

doque opened this issue Dec 14, 2016 · 2 comments

Comments

@doque
Copy link

doque commented Dec 14, 2016

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>
@arunoda
Copy link
Member

arunoda commented Dec 15, 2016

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.

@arunoda arunoda removed the bug label Dec 18, 2016
moimikey added a commit to moimikey/react-storybook that referenced this issue Mar 13, 2017
moimikey added a commit to moimikey/react-storybook that referenced this issue Mar 13, 2017
@wildeyes
Copy link

wildeyes commented Sep 3, 2017

Is there any documentation on how to use the feature closed with the #723 pull request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants