storybookjs/storybook

Refs to other localhosts do not work

开放

#18,405 创建于 2022年6月4日

 (12 条评论) (9 个反应) (0 位负责人)TypeScript (10,058 个派生)batch import
bugcompositionhas workaroundhelp wantedsev:S3triage:reviewed

仓库指标

星标
 (89,909 个星标)
PR 合并指标
 (平均合并 7天 22小时) (30 天内合并 184 个 PR)

描述

Bug:

Access to fetch at 'http://localhost:3000/stories.json' from origin 'http://localhost:3020' has been blocked by CORS policy: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'.

You can not use the wildcard * when the credentials mode is true. At the moment it is not set so I think chrome is placing:

Access-Control-Allow-Credentials: true

by default. I think when this is set to:

Access-Control-Allow-Credentials: false

it should work.

贡献者指南