storybookjs/storybook

Refs to other localhosts do not work

Offen

#18.405 geöffnet am 04.06.2022

 (12 Kommentare) (9 Reaktionen) (0 zugewiesene Personen)TypeScript (10.058 Forks)batch import
bugcompositionhas workaroundhelp wantedsev:S3triage:reviewed

Repository-Metriken

Stars
 (89.909 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 7T 22h) (184 gemergte PRs in 30 T)

Beschreibung

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.

Contributor Guide