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.

貢獻者指南